-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
70 lines (61 loc) · 1.74 KB
/
main.cpp
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
68
69
70
//#include "DICOM_RW.h"
#include "Reader.h"
#include "stdio.h"
#include <list>
#include <windows.h>
//opencv
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv/ml.h>
#include <opencv/cxcore.h>
#include <opencv2/core/types_c.h>
//#include <opencv2/legacy/legacy.hpp>
# pragma comment(lib, "opencv_core340d.lib")
# pragma comment(lib, "opencv_highgui340d.lib")
# pragma comment(lib, "opencv_imgproc340d.lib")
# pragma comment(lib, "opencv_video340d.lib")
# pragma comment(lib, "opencv_ml340d.lib")
# pragma comment(lib, "opencv_calib3d340d.lib")
# pragma comment(lib, "opencv_objdetect340d.lib")
# pragma comment(lib, "opencv_features2d340d.lib")
//# pragma comment(lib, "opencv_contrib340d.lib")
# pragma comment(lib, "opencv_ts340d.lib")
//# pragma comment(lib, "opencv_legacy340d.lib")
# pragma comment(lib, "opencv_flann340d.lib")
//# pragma comment(lib, "opencv_gpu340d.lib")
using namespace cv;
#include "BorderDetecter.h"
int main(int argc, char** argv)
{
std::list<Mat> buff;
CvPoint c;
c.x = 0;
c.y = 0;
int num = 256;
int insert = 0;
// read DICOM files
if (argc == 2)
{
wchar_t wpath[MAX_PATH];
mbstowcs(wpath, argv[1], strlen(argv[1])+1);
Reader::Read(wpath, &buff);
}
else
{
Reader::Read(L"C:\\DIPLOM\\IMAGES\\*", &buff);
}
/*
printf("Input center point:\nx = ");
scanf_s("%d", &c.x);
printf("y = ");
scanf_s("%d", &c.y);
printf ("Input number of main points:\nnumber = ");
scanf_s("%d", &num);
printf("Input number of inserted points:\nnumber = ");
scanf_s("%d", &insert);
*/
// detect border
BorderDetecter detecter;
detecter.Detect(&buff, c, num, insert, 100, 20, -400, 200, 0, 512, 250, 0);
return 0;
}