-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_nyul.cpp
39 lines (33 loc) · 1.65 KB
/
test_nyul.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
#include <iostream>
#include "nyul_standardization.h"
using namespace std;
////////////////////////////////////////////////////////////////////////////////////////////////
/*
This program is performing the histogram normalization given a reference volume
- The program is assuming that the skull is removed!!!!!
- It is based on the image processing algorithm described in
Crimi, Alessandro, et al. "Semi-automatic classification of lesion patterns in patients with clinically isolated syndrome." 2013 IEEE 10th International
Symposium on Biomedical Imaging. IEEE, 2013.
This code attempts to use the same variable names of the article.
The algorithm first standardizes both the reference and the input volume to a standard range (e.g. 1-256),
then the histogram of the input image is stretched to match the reference image.
the normalized voxels are then mapped back to the input volume and saved.
The output is given by the normalized input volume and by the reference volume standardized within the range
Alessandro Crimi INRIA 9/10/2012
*/
////////////////////////////////////////////////////////////////////////////////////////////////
int main(int argc, char * argv[])
{
cout << "Be sure that the images have the skull removed" << endl;
// Verify command line arguments
if( argc < 3 )
{
std::cerr << "Usage: nyul_standardization inputImageFileRef inputImageFile" << std::endl;
return EXIT_FAILURE;
}
// Parse command line arguments
std::string inputFilename_ref = argv[1];
std::string inputFilename = argv[2];
// Call the main function
nyul_standardization(inputFilename_ref, inputFilename);
}