26 CPPUNIT_TEST_SUITE(mitkImageDataItemTestSuite);
28 CPPUNIT_TEST_SUITE_END();
39 std::array<unsigned int, 3> dimensions = {{ 1700, 1700, 1700 }};
40 m_Image->Initialize(pixelType, 3, dimensions.data());
43 void TestAccessOnHugeImage()
45 CPPUNIT_ASSERT(m_Image.IsNotNull());
51 auto* voxelStart = writeAccess.
GetData();
53 for (
unsigned int i = 0; i < m_Image->GetDimension(); i++)
54 imageSize *= m_Image->GetDimension(i);
56 auto* voxelEnd = voxelStart + imageSize;
58 CPPUNIT_ASSERT(writeAccess.GetData() !=
nullptr);
59 auto* accessCheck = voxelEnd - 1;
62 catch (
const itk::MemoryAllocationError& e)
Gives locked and index-based write access for a particular image part. The class provides several set...
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
#define MITK_TEST(TESTMETHOD)
Adds a test to the current test suite.
Test fixture for parameterized tests.
virtual TPixel * GetData() const
Gives full data access.
Class for defining the data type of pixels.