16 #pragma warning(disable : 4996)
29 #include <vtkSmartPointer.h>
41 CPPUNIT_TEST_SUITE(mitkClassificationTestSuite);
43 CPPUNIT_TEST_SUITE_END();
52 void TestClassification()
54 size_t forestSize = 10;
57 std::string train =
GetTestDataFilePath(
"DiffusionImaging/ProgressionAnalysis/Classification/Train.xml");
58 std::string eval =
GetTestDataFilePath(
"DiffusionImaging/ProgressionAnalysis/Classification/Test.xml");
60 std::vector<std::string> modalities;
62 modalities.push_back(
"MOD0");
63 modalities.push_back(
"MOD1");
84 GetTestDataFilePath(
"DiffusionImaging/ProgressionAnalysis/Classification/TESTING_RESULT.nrrd"));
99 compareFilter->SetInput(0, refImage.GetPointer());
100 compareFilter->SetInput(1, resultImage);
101 compareFilter->SetTolerance(.1);
102 compareFilter->Update();
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
DataCollection::Pointer LoadCollection(const std::string &xmlFileName)
Build up a mitk::DataCollection from a XML resource.
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
#define MITK_TEST(TESTMETHOD)
Adds a test to the current test suite.
void SetTrainMargin(vcl_size_t dil2d, vcl_size_t dil3d)
void SetMaskID(std::string maskID="BRAINMASK")
SetMaskID sets binary mask denoting area that is evluated/included in training.
mitk::Image::Pointer GetMitkImage(vcl_size_t index)
GetMitkImage - casts data to mitk::Image and returns it.
static std::string GetTestDataFilePath(const std::string &testData)
Get the absolute path for test data.
void SelectTrainingSamples(DataCollection *collection, unsigned int mode=0)
SelectTrainingSamples.
void PredictInvasion(DataCollection *collection, std::vector< std::string > modalitiesList)
PredictGrowth - Classify voxels into remaining healthy / turning into tumor.
Test fixture for parameterized tests.
The TumorInvasionAnalysis class - Classifies Tumor progression using RF and predicts on new cases...
void LearnProgressionFeatures(DataCollection *collection, std::vector< std::string > modalitiesList, vcl_size_t forestSize=300, vcl_size_t treeDepth=10)
LearnProgressionFeatures.
void SetClassRatio(ScalarType ratio)
SetClassRatio - set ratio of tumor voxels to healthy voxels that is to be used for training...
itk::DataObject::Pointer GetData(vcl_size_t index)
GetData Get original data by index.
static mitk::Image::Pointer LoadImage(const std::string &path)
LoadImage Convenience method to load an arbitrary mitkImage.