~6 Minutes and 1800 lines for a test is too long.
- use smaller test images
- test data
- 2D?
- 3D
- 4D
- API of ImageStatisticsCalculator
- void SetInputImage(mitk::Image::Pointer image)
- 2D?
- 3D
- 4D
- LabelSetImage?
- void SetInputImage(mitk::Image::Pointer image)
- void SetMask(mitk::MaskGenerator::Pointer mask)
- void SetSecondaryMask(mitk::MaskGenerator::Pointer mask)
- unsigned int GetNBinsForHistogramStatistics() const
- double GetBinSizeForHistogramStatistics() const
- analyze if all 33 tests are really useful or if they are redundant
Tests:
- MITK_TEST(TestUninitializedImage)
- image: nullptr
- mask/planarfigure: -
- expected: mitk::Exception
- MITK_TEST(TestCase1)
- image: ImageStatisticsTestData/testimage.dcm
- mask/planarfigure: mitk::PlanarPolygon
- expected: one white pixel x-direction (255), mean, stddev, median tested
- MITK_TEST(TestCase2)
- image: ImageStatisticsTestData/testimage.dcm
- mask/planarfigure: mitk::PlanarPolygon
- expected: half one white pixel x-direction (255), mean, stddev, median tested
- MITK_TEST(TestCase3)
- image: ImageStatisticsTestData/testimage.dcm
- mask/planarfigure: mitk::PlanarPolygon
- expected: half one white pixel xy-direction (255), mean, stddev, median tested
- MITK_TEST(TestCase4)
- image: ImageStatisticsTestData/testimage.dcm
- mask/planarfigure: mitk::PlanarPolygon
- expected: one pixel white pixel + 2 half-pixels white + 1 half pixel black, mean, stddev, median tested
- MITK_TEST(TestCase5)
- image: ImageStatisticsTestData/testimage.dcm
- mask/planarfigure: mitk::PlanarPolygon
- expected: one pixel white pixel + 1 half-pixels gray, mean, stddev, median tested
- MITK_TEST(TestCase6)
- image: ImageStatisticsTestData/testimage.dcm
- mask/planarfigure: mitk::PlanarPolygon
- expected: quarter pixel (black) + whole pixel (white) + half pixel (gray) in x-direction, mean, stddev, median tested
- MITK_TEST(TestCase7)
- MITK_TEST(TestCase8)
- MITK_TEST(TestCase9)
- MITK_TEST(TestCase10)
- MITK_TEST(TestCase11)
- MITK_TEST(TestCase12)
- MITK_TEST(TestImageMaskingEmpty)
- image: ImageStatisticsTestData/testimage.dcm
- mask/planarfigure: empty mitk::Image as mask
- expected: empty statistics container
- MITK_TEST(TestImageMaskingNonEmpty)
- image: ImageStatisticsTestData/testimage.dcm
- mask/planarfigure: mitk::Image with 3 activated pixels as mask
- expected: statistics based on three pixels, mean, stddev, median tested
- MITK_TEST(TestRecomputeOnModifiedMask)
- image: ImageStatisticsTestData/testimage.dcm
- mask/planarfigure: mitk::Image with 3 activated pixels as mask
- expected: first empty statistics container, then numberOfVoxels==1
- MITK_TEST(TestPic3DStatistics)
- image: Pic3D.nrrd
- mask/planarfigure: -
- expected: known statistics (from external code/toolkit?)
- MITK_TEST(TestPic3DAxialPlanarFigureMaskStatistics)
- MITK_TEST(TestPic3DSagittalPlanarFigureMaskStatistics)
- MITK_TEST(TestPic3DCoronalPlanarFigureMaskStatistics)
- MITK_TEST(TestPic3DImageMaskStatistics_label1)
- MITK_TEST(TestPic3DImageMaskStatistics_label2)
- MITK_TEST(TestPic3DIgnorePixelValueMaskStatistics)
- MITK_TEST(TestPic3DSecondaryMaskStatistics)
- MITK_TEST(TestUS4DCylStatistics_time1
- MITK_TEST(TestUS4DCylAxialPlanarFigureMaskStatistics_time1)
- MITK_TEST(TestUS4DCylSagittalPlanarFigureMaskStatistics_time1)
- MITK_TEST(TestUS4DCylCoronalPlanarFigureMaskStatistics_time1)
- MITK_TEST(TestUS4DCylImageMaskStatistics_time1_label_1)
- MITK_TEST(TestUS4DCylImageMaskStatistics_time2_label_1)
- MITK_TEST(TestUS4DCylImageMaskStatistics_time1_label_2)
- MITK_TEST(TestUS4DCylIgnorePixelValueMaskStatistics_time1)
- MITK_TEST(TestUS4DCylSecondaryMaskStatistics_time1)
Summary:
- 3 test images
- several planar figures
- several masks
- different labels
- different time
- unitialized image