29 CPPUNIT_TEST_SUITE(mitkRTDoseReaderTestSuite);
31 CPPUNIT_TEST_SUITE_END();
45 std::vector<itk::SmartPointer<mitk::BaseData> > readerOutput = doseReader.Read();
46 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"reader output should have one entry.", static_cast<unsigned int>(1), static_cast<unsigned int>(readerOutput.size()));
50 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"read image should not be null", image.IsNotNull(),
true);
51 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"reference image and image should be equal",
true,
mitk::Equal(*image, *refImage,
mitk::eps,
true));
55 double actualPrescribedDose = prescribedDoseGenericProperty->
GetValue();
56 double expectedPrescribedDose = 65535 * 0.0010494648*0.8;
57 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
"prescribed dose property is not as expected", expectedPrescribedDose, actualPrescribedDose, 1e-5);
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
RTDoseReader reads DICOM files of modality RTDOSE.
#define MITK_TEST(TESTMETHOD)
Adds a test to the current test suite.
static std::string GetTestDataFilePath(const std::string &testData)
Get the absolute path for test data.
Image class for storing images.
Test fixture for parameterized tests.
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.
static const std::string PRESCRIBED_DOSE_PROPERTY_NAME
MITKCORE_EXPORT const ScalarType eps
static mitk::Image::Pointer LoadImage(const std::string &path)
LoadImage Convenience method to load an arbitrary mitkImage.
virtual T GetValue() const