19 CPPUNIT_TEST_SUITE(mitkPropertyCalculatorTestSuite);
21 CPPUNIT_TEST_SUITE_END();
24 mitk::pa::PropertyCalculator::Pointer m_PropertyCalculator;
34 std::string type,
int wavelength,
int oxygenation)
36 CPPUNIT_ASSERT_MESSAGE(
"anisotropy " + std::to_string(properties.
g) +
" not bigger than 0 at type " 37 + type +
" wv: " + std::to_string(wavelength) +
" ox: " + std::to_string(oxygenation), properties.
g > 0);
38 CPPUNIT_ASSERT_MESSAGE(
"absorption " + std::to_string(properties.
mua) +
" not bigger than 0 at type " 39 + type +
" wv: " + std::to_string(wavelength) +
" ox: " + std::to_string(oxygenation), properties.
mua > 0);
40 CPPUNIT_ASSERT_MESSAGE(
"scattering " + std::to_string(properties.
mus) +
" not bigger than 0 at type " 41 + type +
" wv: " + std::to_string(wavelength) +
" ox: " + std::to_string(oxygenation), properties.
mus > 0);
44 void testOutputIsNotEmpty()
46 for (
double oxygenation = 0; oxygenation <= 1; oxygenation += 0.05)
48 for (
int wavelength = 700; wavelength <= 900; wavelength += 5)
50 auto properties = m_PropertyCalculator->CalculatePropertyForSpecificWavelength(
51 mitk::pa::PropertyCalculator::TissueType::AIR, wavelength, oxygenation);
52 assertProperties(properties,
"AIR", wavelength, oxygenation);
53 properties = m_PropertyCalculator->CalculatePropertyForSpecificWavelength(
54 mitk::pa::PropertyCalculator::TissueType::BLOOD, wavelength, oxygenation);
55 assertProperties(properties,
"BLOOD", wavelength, oxygenation);
56 properties = m_PropertyCalculator->CalculatePropertyForSpecificWavelength(
57 mitk::pa::PropertyCalculator::TissueType::EPIDERMIS, wavelength, oxygenation);
58 assertProperties(properties,
"EPIDERMIS", wavelength, oxygenation);
59 properties = m_PropertyCalculator->CalculatePropertyForSpecificWavelength(
60 mitk::pa::PropertyCalculator::TissueType::FAT, wavelength, oxygenation);
61 assertProperties(properties,
"FAT", wavelength, oxygenation);
62 properties = m_PropertyCalculator->CalculatePropertyForSpecificWavelength(
63 mitk::pa::PropertyCalculator::TissueType::STANDARD_TISSUE, wavelength, oxygenation);
64 assertProperties(properties,
"STANDARD_TISSUE", wavelength, oxygenation);
69 void tearDown()
override 71 m_PropertyCalculator =
nullptr;
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
#define MITK_TEST(TESTMETHOD)
Adds a test to the current test suite.
Test fixture for parameterized tests.