|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Generator for synthetic MITK images. More...
#include <mitkImageGenerator.h>
Static Public Member Functions | |
| template<typename TPixelType > | |
| static mitk::Image::Pointer | GenerateGradientImage (unsigned int dimX, unsigned int dimY, unsigned int dimZ, float spacingX=1, float spacingY=1, float spacingZ=1) |
| Generates a 3D gradient image with the defined size and spacing. More... | |
| template<typename TPixelType > | |
| static mitk::Image::Pointer | GenerateImageFromReference (mitk::Image::Pointer reference, TPixelType fill_value) |
| Generates an image with the same geometry as the given reference image. More... | |
| template<typename TPixelType > | |
| static mitk::Image::Pointer | GenerateRandomImage (unsigned int dimX, unsigned int dimY, unsigned int dimZ=1, unsigned int dimT=1, mitk::ScalarType spacingX=1, mitk::ScalarType spacingY=1, mitk::ScalarType spacingZ=1, const double randomMax=1000.0f, const double randMin=0.0f) |
| Generates a random image with the defined size and spacing. More... | |
Generator for synthetic MITK images.
This is a helper class to generate synthetic MITK images (random or gradient).
Definition at line 32 of file mitkImageGenerator.h.
|
inlinestatic |
Generates a 3D gradient image with the defined size and spacing.
Pixel values are filled sequentially starting from 0 and incrementing by 1 for each voxel.
| TPixelType | The pixel type of the generated image. |
| dimX | Image dimension in X direction (number of columns). |
| dimY | Image dimension in Y direction (number of rows). |
| dimZ | Image dimension in Z direction (number of slices). |
| spacingX | Voxel spacing in X direction. Defaults to 1. |
| spacingY | Voxel spacing in Y direction. Defaults to 1. |
| spacingZ | Voxel spacing in Z direction. Defaults to 1. |
Definition at line 51 of file mitkImageGenerator.h.
References mitk::Image::New().
|
inlinestatic |
Generates an image with the same geometry as the given reference image.
The image buffer is filled uniformly with the specified fill value.
| TPixelType | The pixel type of the generated image. |
| reference | The reference image whose geometry is used for the new image. |
| fill_value | The value to fill every voxel with. |
Definition at line 112 of file mitkImageGenerator.h.
References mitk::ImageWriteAccessor::GetData(), MITK_ERROR, and mitk::Image::New().
|
inlinestatic |
Generates a random image with the defined size and spacing.
Creates a 2D, 3D, or 4D image depending on the dimension parameters. Supported pixel types are int, float, double, unsigned char, and unsigned short.
| TPixelType | The pixel type of the generated image. |
| dimX | Image dimension in X direction (number of columns). |
| dimY | Image dimension in Y direction (number of rows). |
| dimZ | Image dimension in Z direction. If <= 1, a 2D image is created. Defaults to 1. |
| dimT | Image dimension in time. If <= 1, no time dimension is added. Defaults to 1. |
| spacingX | Voxel spacing in X direction. Defaults to 1. |
| spacingY | Voxel spacing in Y direction. Defaults to 1. |
| spacingZ | Voxel spacing in Z direction. Defaults to 1. |
| randomMax | The upper bound for random values. Defaults to 1000. |
| randMin | The lower bound for random values (used for float/double types). Defaults to 0. |
Definition at line 161 of file mitkImageGenerator.h.
References mitk::PixelType::GetComponentType(), mitk::ImageWriteAccessor::GetData(), MITK_ERROR, and mitk::Image::New().