-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
67 lines (56 loc) · 1.49 KB
/
Copy pathmain.cpp
File metadata and controls
67 lines (56 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include "Image/image.h"
#include "Util/cmdLineParser.h"
void ShowUsage(char* ex){
printf("Usage %s:\n",ex);
printf("\t--in <input image> --out <output image>\n");
printf("\t[--axoplasmicreticula]\n");
}
void mexFunction( int nlhs , mxArray *plhs[] , int argc , const mxArray *prhs[] ) {
if (argc == 0)
{
ShowUsage("FindReticula") ;
return ;
}
//char** argv = new char*[argc] ;
//for ( int i = 0 ; i < argc ; i++ )
//{
// char* arg = (char *)mxArrayToString(prhs[i]) ;
// argv[i] = strdup(arg) ;
// printf("%s\n", argv[i]);
// mxFree(arg);
//}
//
//cmdLineString In , Out ;
//cmdLineReadable APR ;
//
//char* paramNames[]={
// "in","out",
// "axoplasmicreticula"
//};
//cmdLineReadable* params[]=
//{
// &In,&Out,
// &APR
//};
////cmdLineParse(argc-1,&argv[1],paramNames,sizeof(paramNames)/sizeof(char*),params); // <-- CPP
//cmdLineParse(argc,&argv[0],paramNames,sizeof(paramNames)/sizeof(char*),params); // <-- MATLAB
//// Check that the input and output files have been set
//if(!In.set || !Out.set){
// if(!In.set) {printf("Input image was not set\n");}
// else {printf("Output image was not set\n");}
// ShowUsage("FindReticula") ;
// return ; //EXIT_FAILURE;
//}
//if(APR.set){
MatlabImage image(prhs[1]) ;
MatlabImage out(prhs[3]) ;
if (!image.AxoplasmicReticula(image , out)) {
printf("Could not compute axoplasmic reticula in the image\n");
}
/*return ;
}*/
return ; //EXIT_SUCCESS;
}