Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitk::ImageGenerator Class Reference

generator for synthetic MITK images This is a helper class to generate synthetic MITK images (random or gradient). 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 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 of a same geometry as the one given as reference. 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 random image with the defined size and spacing. More...
 

Detailed Description

generator for synthetic MITK images This is a helper class to generate synthetic MITK images (random or gradient).

Definition at line 30 of file mitkImageGenerator.h.

Member Function Documentation

◆ GenerateGradientImage()

template<typename TPixelType >
static mitk::Image::Pointer mitk::ImageGenerator::GenerateGradientImage ( unsigned int  dimX,
unsigned int  dimY,
unsigned int  dimZ,
float  spacingX = 1,
float  spacingY = 1,
float  spacingZ = 1 
)
inlinestatic

Generates gradient image with the defined size and spacing.

Definition at line 37 of file mitkImageGenerator.h.

References mitk::Image::New().

◆ GenerateImageFromReference()

template<typename TPixelType >
static mitk::Image::Pointer mitk::ImageGenerator::GenerateImageFromReference ( mitk::Image::Pointer  reference,
TPixelType  fill_value 
)
inlinestatic

Generates an image of a same geometry as the one given as reference.

The image buffer is filled to the fill_value given as parameter

Definition at line 93 of file mitkImageGenerator.h.

References mitk::ImageWriteAccessor::GetData(), MITK_ERROR, and mitk::Image::New().

◆ GenerateRandomImage()

template<typename TPixelType >
static mitk::Image::Pointer mitk::ImageGenerator::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 
)
inlinestatic

Generates random image with the defined size and spacing.

Definition at line 127 of file mitkImageGenerator.h.

References mitk::PixelType::GetComponentType(), mitk::ImageWriteAccessor::GetData(), MITK_ERROR, and mitk::Image::New().


The documentation for this class was generated from the following file: