Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
The HotspotMaskGenerator class is used when a hotspot has to be found in an image. A hotspot is the region of the image where the mean intensity is maximal (=brightest spot). It is usually used in PET scans. The identification of the hotspot is done as follows: First a cubic (or circular, if image is 2d) mask of predefined size is generated. This mask is then convolved with the input image (in fourier domain). The maximum value of the convolved image then corresponds to the hotspot. If a maskGenerator is set, only the pixels of the convolved image where the corresponding mask is == label are searched for the maximum value. More...
#include <mitkHotspotMaskGenerator.h>
Classes | |
class | ImageExtrema |
Public Types | |
typedef HotspotMaskGenerator | Self |
typedef MaskGenerator | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
![]() | |
typedef MaskGenerator | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
virtual const char * | GetClassName () const |
void | SetInputImage (mitk::Image::Pointer inputImage) |
Set the input image. Required for this class. More... | |
void | SetMask (MaskGenerator::Pointer mask) |
Set a mask (can be nullptr if no mask is desired) More... | |
void | SetHotspotRadiusInMM (double radiusInMillimeter) |
Set the radius of the hotspot (in MM) More... | |
const double & | GetHotspotRadiusinMM () const |
void | SetHotspotMustBeCompletelyInsideImage (bool hotspotCompletelyInsideImage) |
Define whether the hotspot must be completely inside the image. Default is true. More... | |
bool | GetHotspotMustBeCompletelyInsideImage () const |
void | SetLabel (unsigned short label) |
If a maskGenerator is set, this detemines which mask value is used. More... | |
mitk::Image::Pointer | GetMask () override |
Computes and returns the hotspot mask. The hotspot mask has the same size as the input image. The hopspot has value 1, the remaining pixels are set to 0. More... | |
vnl_vector< int > | GetHotspotIndex () |
Returns the image index where the hotspot is located. More... | |
vnl_vector< int > | GetConvolutionImageMinIndex () |
Returns the index where the convolution image is minimal (darkest spot in image) More... | |
void | SetTimeStep (unsigned int timeStep) override |
SetTimeStep is used to set the time step for which the mask is to be generated. More... | |
![]() | |
virtual mitk::Image::ConstPointer | GetReferenceImage () |
GetReferenceImage per default returns the inputImage (as set by SetInputImage). If no input image is set it will return a nullptr. More... | |
void | SetInputImage (mitk::Image::ConstPointer inputImg) |
SetInputImage is used to set the input image to the mask generator. Some subclasses require an input image, others don't. See the documentation of the specific Mask Generator for more information. More... | |
Static Public Member Functions | |
static Pointer | New () |
![]() | |
static Pointer | New () |
Protected Member Functions | |
HotspotMaskGenerator () | |
~HotspotMaskGenerator () override | |
![]() | |
MaskGenerator () | |
Additional Inherited Members | |
![]() | |
unsigned int | m_TimeStep |
mitk::Image::Pointer | m_InternalMask |
mitk::Image::ConstPointer | m_inputImage |
The HotspotMaskGenerator class is used when a hotspot has to be found in an image. A hotspot is the region of the image where the mean intensity is maximal (=brightest spot). It is usually used in PET scans. The identification of the hotspot is done as follows: First a cubic (or circular, if image is 2d) mask of predefined size is generated. This mask is then convolved with the input image (in fourier domain). The maximum value of the convolved image then corresponds to the hotspot. If a maskGenerator is set, only the pixels of the convolved image where the corresponding mask is == label are searched for the maximum value.
Definition at line 37 of file mitkHotspotMaskGenerator.h.
typedef itk::SmartPointer< const Self > mitk::HotspotMaskGenerator::ConstPointer |
Definition at line 44 of file mitkHotspotMaskGenerator.h.
Definition at line 43 of file mitkHotspotMaskGenerator.h.
Standard Self typedef
Definition at line 41 of file mitkHotspotMaskGenerator.h.
Definition at line 42 of file mitkHotspotMaskGenerator.h.
|
protected |
Definition at line 25 of file mitkHotspotMaskGenerator.cpp.
References mitk::MaskGenerator::m_InternalMask, mitk::MaskGenerator::m_TimeStep, and mitk::Image::New().
|
overrideprotected |
Definition at line 55 of file mitkHotspotMaskGenerator.cpp.
|
virtual |
Runtime information support.
Reimplemented from mitk::MaskGenerator.
vnl_vector< int > mitk::HotspotMaskGenerator::GetConvolutionImageMinIndex | ( | ) |
Returns the index where the convolution image is minimal (darkest spot in image)
Definition at line 172 of file mitkHotspotMaskGenerator.cpp.
References GetMask().
vnl_vector< int > mitk::HotspotMaskGenerator::GetHotspotIndex | ( | ) |
Returns the image index where the hotspot is located.
Definition at line 178 of file mitkHotspotMaskGenerator.cpp.
References mitk::HotspotMaskGenerator::ImageExtrema::Defined, GetMask(), mitk::GrabItkImageMemory(), mitk::MaskGenerator::m_inputImage, mitk::MaskGenerator::m_InternalMask, max(), mitk::HotspotMaskGenerator::ImageExtrema::Max, mitk::HotspotMaskGenerator::ImageExtrema::MaxIndex, min(), mitk::HotspotMaskGenerator::ImageExtrema::Min, mitk::HotspotMaskGenerator::ImageExtrema::MinIndex, MITK_DEBUG, and MITK_ERROR.
bool mitk::HotspotMaskGenerator::GetHotspotMustBeCompletelyInsideImage | ( | ) | const |
Definition at line 73 of file mitkHotspotMaskGenerator.cpp.
const double & mitk::HotspotMaskGenerator::GetHotspotRadiusinMM | ( | ) | const |
Definition at line 68 of file mitkHotspotMaskGenerator.cpp.
|
overridevirtual |
Computes and returns the hotspot mask. The hotspot mask has the same size as the input image. The hopspot has value 1, the remaining pixels are set to 0.
Reimplemented from mitk::MaskGenerator.
Definition at line 88 of file mitkHotspotMaskGenerator.cpp.
References AccessFixedDimensionByItk_2, mitk::CastToItkImage(), mitk::MaskGenerator::m_inputImage, mitk::MaskGenerator::m_InternalMask, mitk::MaskGenerator::m_TimeStep, and mitk::ImageTimeSelector::New().
Referenced by GetConvolutionImageMinIndex(), and GetHotspotIndex().
|
static |
Method for creation through the object factory.
void mitk::HotspotMaskGenerator::SetHotspotMustBeCompletelyInsideImage | ( | bool | hotspotCompletelyInsideImage | ) |
Define whether the hotspot must be completely inside the image. Default is true.
Definition at line 78 of file mitkHotspotMaskGenerator.cpp.
void mitk::HotspotMaskGenerator::SetHotspotRadiusInMM | ( | double | radiusInMillimeter | ) |
Set the radius of the hotspot (in MM)
Definition at line 59 of file mitkHotspotMaskGenerator.cpp.
void mitk::HotspotMaskGenerator::SetInputImage | ( | mitk::Image::Pointer | inputImage | ) |
Set the input image. Required for this class.
Definition at line 35 of file mitkHotspotMaskGenerator.cpp.
References mitk::MaskGenerator::m_inputImage.
void mitk::HotspotMaskGenerator::SetLabel | ( | unsigned short | label | ) |
If a maskGenerator is set, this detemines which mask value is used.
Definition at line 163 of file mitkHotspotMaskGenerator.cpp.
void mitk::HotspotMaskGenerator::SetMask | ( | MaskGenerator::Pointer | mask | ) |
Set a mask (can be nullptr if no mask is desired)
Definition at line 46 of file mitkHotspotMaskGenerator.cpp.
References mask.
|
overridevirtual |
SetTimeStep is used to set the time step for which the mask is to be generated.
timeStep |
Reimplemented from mitk::MaskGenerator.
Definition at line 155 of file mitkHotspotMaskGenerator.cpp.
References mitk::MaskGenerator::m_TimeStep.