Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitk::ContourModelUtils Class Reference

Helpful methods for working with contours and images. More...

#include <mitkContourModelUtils.h>

Inheritance diagram for mitk::ContourModelUtils:
Collaboration diagram for mitk::ContourModelUtils:

Static Public Member Functions

static mitkClassMacroItkParent(ContourModelUtils, itk::Object) static ContourModel ContourModel::Pointer BackProjectContourFrom2DSlice (const BaseGeometry *sliceGeometry, ContourModel *contourIn2D, bool correctionForIpSegmentation=false)
 Projects a contour onto an image point by point. Converts from world to index coordinates. More...
 
static void FillContourInSlice (ContourModel *projectedContour, Image *sliceImage, mitk::Image::Pointer workingImage, int paintingPixelValue=1)
 Fill a contour in a 2D slice with a specified pixel value at time step 0. More...
 
static void FillContourInSlice (ContourModel *projectedContour, unsigned int timeStep, Image *sliceImage, mitk::Image::Pointer workingImage, int paintingPixelValue=1)
 Fill a contour in a 2D slice with a specified pixel value at a given time step. More...
 
static void FillSliceInSlice (vtkSmartPointer< vtkImageData > filledImage, vtkSmartPointer< vtkImageData > resultImage, mitk::Image::Pointer image, int paintingPixelValue)
 Fills a image (filledImage) into another image (resultImage) by incorporating the rules of LabelSet-Images. More...
 
static ContourModel::Pointer MoveZerothContourTimeStep (const ContourModel *contour, unsigned int timeStep)
 Move the contour in time step 0 to to a new contour model at the given time step. More...
 

Protected Member Functions

 ContourModelUtils ()
 
 ~ContourModelUtils () override
 

Detailed Description

Helpful methods for working with contours and images.

Definition at line 29 of file mitkContourModelUtils.h.

Constructor & Destructor Documentation

◆ ContourModelUtils()

mitk::ContourModelUtils::ContourModelUtils ( )
protected

Definition at line 23 of file mitkContourModelUtils.cpp.

◆ ~ContourModelUtils()

mitk::ContourModelUtils::~ContourModelUtils ( )
overrideprotected

Member Function Documentation

◆ BackProjectContourFrom2DSlice()

mitk::ContourModel::Pointer mitk::ContourModelUtils::BackProjectContourFrom2DSlice ( const BaseGeometry sliceGeometry,
ContourModel contourIn2D,
bool  correctionForIpSegmentation = false 
)
static

Projects a contour onto an image point by point. Converts from world to index coordinates.

Parameters
correctionForIpSegmentationadds 0.5 to x and y index coordinates (difference between ipSegmentation and MITK contours) Projects a slice index coordinates of a contour back into world coordinates.
correctionForIpSegmentationsubtracts 0.5 to x and y index coordinates (difference between ipSegmentation and MITK contours)

Definition at line 65 of file mitkContourModelUtils.cpp.

References mitk::ContourModel::Begin(), mitk::ContourModel::End(), mitk::BaseData::GetTimeSteps(), mitk::BaseGeometry::IndexToWorld(), and mitk::ContourModel::New().

Referenced by mitk::ContourUtils::BackProjectContourFrom2DSlice(), and mitk::FeedbackContourTool::BackProjectContourFrom2DSlice().

◆ FillContourInSlice() [1/2]

void mitk::ContourModelUtils::FillContourInSlice ( ContourModel projectedContour,
Image sliceImage,
mitk::Image::Pointer  workingImage,
int  paintingPixelValue = 1 
)
static

◆ FillContourInSlice() [2/2]

void mitk::ContourModelUtils::FillContourInSlice ( ContourModel projectedContour,
unsigned int  timeStep,
Image sliceImage,
mitk::Image::Pointer  workingImage,
int  paintingPixelValue = 1 
)
static

Fill a contour in a 2D slice with a specified pixel value at a given time step.

Definition at line 104 of file mitkContourModelUtils.cpp.

References mitk::eps, FillSliceInSlice(), mitk::Image::GetVtkImageData(), image, MITK_WARN, mitk::ContourModelToSurfaceFilter::New(), mitk::Surface::New(), and mitk::Image::SetVolume().

◆ FillSliceInSlice()

void mitk::ContourModelUtils::FillSliceInSlice ( vtkSmartPointer< vtkImageData >  filledImage,
vtkSmartPointer< vtkImageData >  resultImage,
mitk::Image::Pointer  image,
int  paintingPixelValue 
)
static

Fills a image (filledImage) into another image (resultImage) by incorporating the rules of LabelSet-Images.

Definition at line 156 of file mitkContourModelUtils.cpp.

References mitk::LabelSetImage::GetExteriorLabel(), and mitk::Label::GetValue().

Referenced by FillContourInSlice().

◆ MoveZerothContourTimeStep()

mitk::ContourModel::Pointer mitk::ContourModelUtils::MoveZerothContourTimeStep ( const ContourModel contour,
unsigned int  timeStep 
)
static

Move the contour in time step 0 to to a new contour model at the given time step.

Definition at line 203 of file mitkContourModelUtils.cpp.

References mitk::ContourModel::Begin(), mitk::ContourModel::End(), and mitk::ContourModel::New().

Referenced by mitk::SetRegionTool::OnMousePressed(), and mitk::RegionGrowingTool::OnMousePressedOutside().


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