29 mitk::ImageGenerator::GenerateRandomImage<float>(120, 205, 0, 0, 0.1, 0.2, 0.3, 577, 23);
30 mitk::Image::Pointer image2Db = mitk::ImageGenerator::GenerateRandomImage<unsigned char>(1, 1, 0, 0);
32 mitk::Image::Pointer image3Db = mitk::ImageGenerator::GenerateRandomImage<double>(512, 532, 112, 0);
33 mitk::Image::Pointer image4Da = mitk::ImageGenerator::GenerateRandomImage<float>(120, 205, 78, 1);
34 mitk::Image::Pointer image4Db = mitk::ImageGenerator::GenerateRandomImage<unsigned char>(550, 33, 78, 150);
36 mitk::Image::Pointer image3Dc = mitk::ImageGenerator::GenerateGradientImage<unsigned int>(1, 2, 3, 4, 5, 6);
39 "Testing if spacing x is set correctly.");
41 "Testing if spacing y is set correctly.");
43 "Testing if spacing z is set correctly.");
46 "Testing if default spacing x is set correctly.");
48 "Testing if default spacing y is set correctly.");
50 "Testing if default spacing z is set correctly.");
53 "Testing if spacing x is set correctly.");
55 "Testing if spacing y is set correctly.");
57 "Testing if spacing z is set correctly.");
77 itk::ImageIOBase::IOPixelType scalarType = itk::ImageIOBase::SCALAR;
80 "Testing if the data type is set correctly.");
82 "Testing if the pixel type is set correctly.");
84 "Testing if the data type is set correctly.");
86 "Testing if the data type is set correctly.");
88 "Testing if the data type is set correctly.");
90 "Testing if the pixel type is set correctly.");
92 "Testing if the data type is set correctly.");
94 "Testing if the pixel type is set correctly.");
96 "Testing if the data type is set correctly.");
98 "Testing if the pixel type is set correctly.");
100 "Testing if the data type is set correctly.");
102 "Testing if the pixel type is set correctly.");
104 "Testing if the data type is set correctly.");
106 "Testing if the pixel type is set correctly.");
114 const unsigned int *image3DcBuffer =
nullptr;
118 image3DcBuffer =
static_cast<const unsigned int *
>(readAccess.
GetData());
122 MITK_ERROR <<
"Read access not granted on mitk::Image.";
124 for (
unsigned int i = 0; i < 2 * 3; i++)
int mitkImageGeneratorTest(int, char *[])
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
const void * GetData() const
Gives const access to the data.
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
ImageReadAccessor class to get locked read access for a particular image part.