27 const char *filename3D = argv[2];
37 volumeCalculator->SetImage(image);
38 volumeCalculator->SetThreshold(0);
39 volumeCalculator->ComputeVolume();
40 float volume = volumeCalculator->GetVolume();
44 volumeCalculator->SetThreshold(255);
45 volumeCalculator->ComputeVolume();
46 volume = volumeCalculator->GetVolume();
52 volumeCalculator->SetImage(image);
53 volumeCalculator->SetThreshold(-1023);
54 volumeCalculator->ComputeVolume();
55 std::vector<float> volumes = volumeCalculator->GetVolumes();
57 for (std::vector<float>::iterator it = volumes.begin(); it != volumes.end(); ++it)
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
int mitkVolumeCalculatorTest(int, char *argv[])
static const std::string filename
static mitk::Image::Pointer LoadImage(const std::string &path)
LoadImage Convenience method to load an arbitrary mitkImage.