Build a 1x1xnSlicesxnTimeSteps mitk::Image with float pixels. The data buffer is irrelevant for these tests; only the time geometry / slice count is consulted by DeduceDecayCorrection's iteration loop.
| 29 | // buffer is irrelevant for these tests; only the time geometry / slice |
| 30 | // count is consulted by DeduceDecayCorrection's iteration loop. |
| 31 | mitk::Image::Pointer MakeSyntheticImage(unsigned int nSlices, unsigned int nTimeSteps) |
| 32 | { |
| 33 | mitk::Image::Pointer image = mitk::Image::New(); |
| 34 | const mitk::PixelType pixelType = mitk::MakeScalarPixelType<float>(); |
| 35 | |
| 36 | if (nTimeSteps > 1) |
| 37 | { |
| 38 | const unsigned int dims[4] = { 1u, 1u, nSlices, nTimeSteps }; |
| 39 | image->Initialize(pixelType, 4, dims); |
| 40 | } |
| 41 | else |
| 42 | { |
| 43 | const unsigned int dims[3] = { 1u, 1u, nSlices }; |
| 44 | image->Initialize(pixelType, 3, dims); |
| 45 | } |
| 46 | return image; |
| 47 | } |
| 48 | |
| 49 | // Attach a DICOMProperty to the image's PropertyList using the property |
| 50 | // name format produced by MitkDICOM (DICOM.GGGG.EEEE for top-level tags, |
no test coverage detected