Helpful methods for working with contours and images.
More...
#include <mitkContourModelUtils.h>
|
static ContourModel::Pointer | ProjectContourTo2DSlice (const Image *slice, const ContourModel *contourIn3D) |
| Projects a contour onto an image point by point. Converts from world to index coordinates. More...
|
|
static ContourModel::Pointer | BackProjectContourFrom2DSlice (const BaseGeometry *sliceGeometry, const ContourModel *contourIn2D) |
| Projects a slice index coordinates of a contour back into world coordinates. More...
|
|
static void | FillContourInSlice (const ContourModel *projectedContour, Image *sliceImage, const Image *workingImage, int paintingPixelValue=1) |
| Fill a contour in a 2D slice with a specified pixel value. This version always uses the contour of time step 0 and fills the image. More...
|
|
static void | FillContourInSlice (const ContourModel *projectedContour, TimeStepType contourTimeStep, Image *sliceImage, const Image *workingImage, int paintingPixelValue=1) |
| Fill a contour in a 2D slice with a specified pixel value. This overloaded version uses the contour at the passed contourTimeStep to fill the passed image slice. More...
|
|
static void | FillContourInSlice2 (const ContourModel *projectedContour, Image *sliceImage, int paintingPixelValue=1) |
| Fill a contour in a 2D slice with a specified pixel value. This version always uses the contour of time step 0 and fills the image. More...
|
|
static void | FillContourInSlice2 (const ContourModel *projectedContour, TimeStepType contourTimeStep, Image *sliceImage, int paintingPixelValue=1) |
| Fill a contour in a 2D slice with a specified pixel value. This overloaded version uses the contour at the passed contourTimeStep to fill the passed image slice. More...
|
|
static void | FillSliceInSlice (vtkSmartPointer< vtkImageData > filledImage, vtkSmartPointer< vtkImageData > resultImage, const Image *image, int paintingPixelValue, double fillForegroundThreshold=1.0) |
| Fills the paintingPixelValue into every pixel of resultImage as indicated by filledImage. If a LableSet image is specified it also by incorporating the rules of LabelSet images when filling the content. More...
|
|
static ContourModel::Pointer | MoveZerothContourTimeStep (const ContourModel *contour, TimeStepType timeStep) |
| Move the contour in time step 0 to to a new contour model at the given time step. More...
|
|
static int | GetActivePixelValue (const Image *workingImage) |
| Retrieves the active pixel value of a (labelset) image. If the image is basic image, the pixel value 1 (one) will be returned. If the image is actually a labelset image, the pixel value of the active label of the active layer will be returned. More...
|
|
Helpful methods for working with contours and images.
Definition at line 29 of file mitkContourModelUtils.h.
◆ ContourModelUtils()
mitk::ContourModelUtils::ContourModelUtils |
( |
| ) |
|
|
protected |
◆ ~ContourModelUtils()
mitk::ContourModelUtils::~ContourModelUtils |
( |
| ) |
|
|
overrideprotected |
◆ BackProjectContourFrom2DSlice()
Projects a slice index coordinates of a contour back into world coordinates.
- Parameters
-
sliceGeometry | |
contourIn2D | |
◆ FillContourInSlice() [1/2]
static void mitk::ContourModelUtils::FillContourInSlice |
( |
const ContourModel * |
projectedContour, |
|
|
Image * |
sliceImage, |
|
|
const Image * |
workingImage, |
|
|
int |
paintingPixelValue = 1 |
|
) |
| |
|
static |
Fill a contour in a 2D slice with a specified pixel value. This version always uses the contour of time step 0 and fills the image.
- Deprecated:
- This function is deprecated. Use FillContourInSlice2() (in conjunction e.g. with TransferLabelContent()) instead.
- Precondition
- sliceImage points to a valid instance
-
projectedContour points to a valid instance
◆ FillContourInSlice() [2/2]
static void mitk::ContourModelUtils::FillContourInSlice |
( |
const ContourModel * |
projectedContour, |
|
|
TimeStepType |
contourTimeStep, |
|
|
Image * |
sliceImage, |
|
|
const Image * |
workingImage, |
|
|
int |
paintingPixelValue = 1 |
|
) |
| |
|
static |
Fill a contour in a 2D slice with a specified pixel value. This overloaded version uses the contour at the passed contourTimeStep to fill the passed image slice.
- Deprecated:
- This function is deprecated. Use FillContourInSlice2() (in conjunction e.g. with TransferLabelContentAtTimeStep()) instead.
- Precondition
- sliceImage points to a valid instance
-
projectedContour points to a valid instance
◆ FillContourInSlice2() [1/2]
static void mitk::ContourModelUtils::FillContourInSlice2 |
( |
const ContourModel * |
projectedContour, |
|
|
Image * |
sliceImage, |
|
|
int |
paintingPixelValue = 1 |
|
) |
| |
|
static |
Fill a contour in a 2D slice with a specified pixel value. This version always uses the contour of time step 0 and fills the image.
- Parameters
-
projectedContour | Pointer to the contour that should be projected. |
sliceImage | Pointer to the image which content should be altered by adding the contour with the specified paintingPixelValue. |
paintingPixelValue | |
- Precondition
- sliceImage points to a valid instance
-
projectedContour points to a valid instance
◆ FillContourInSlice2() [2/2]
static void mitk::ContourModelUtils::FillContourInSlice2 |
( |
const ContourModel * |
projectedContour, |
|
|
TimeStepType |
contourTimeStep, |
|
|
Image * |
sliceImage, |
|
|
int |
paintingPixelValue = 1 |
|
) |
| |
|
static |
Fill a contour in a 2D slice with a specified pixel value. This overloaded version uses the contour at the passed contourTimeStep to fill the passed image slice.
- Parameters
-
projectedContour | Pointer to the contour that should be projected. |
contourTimeStep | |
sliceImage | Pointer to the image which content should be altered by |
paintingPixelValue | adding the contour with the specified paintingPixelValue. |
- Precondition
- sliceImage points to a valid instance
-
projectedContour points to a valid instance
◆ FillSliceInSlice()
static void mitk::ContourModelUtils::FillSliceInSlice |
( |
vtkSmartPointer< vtkImageData > |
filledImage, |
|
|
vtkSmartPointer< vtkImageData > |
resultImage, |
|
|
const Image * |
image, |
|
|
int |
paintingPixelValue, |
|
|
double |
fillForegroundThreshold = 1.0 |
|
) |
| |
|
static |
Fills the paintingPixelValue into every pixel of resultImage as indicated by filledImage. If a LableSet image is specified it also by incorporating the rules of LabelSet images when filling the content.
- Parameters
-
filledImage | Pointer to the image content that should be checked to decide if a pixel in resultImage should be filled with paintingPixelValue or not. |
resultImage | Pointer to the image content that should be overwritten guided by the content of filledImage. |
image | Pointer to an mitk image that allows to define the LabelSet image which states steer the filling process. If an LabelSet instance is passed its states (e.g. locked labels etc...) will be used. If nullptr or an normal image is passed, then simply any pixel position indicated by filledImage will be overwritten. |
paintingPixelValue | the pixelvalue/label that should be used in the result image when filling. |
fillForegroundThreshold | The threshold value that decides if a pixel in the filled image counts as foreground (>=fillForegroundThreshold) or not. |
- Deprecated:
- This function is deprecated. Use TransferLabelContent() instead.
◆ GetActivePixelValue()
static int mitk::ContourModelUtils::GetActivePixelValue |
( |
const Image * |
workingImage | ) |
|
|
static |
Retrieves the active pixel value of a (labelset) image. If the image is basic image, the pixel value 1 (one) will be returned. If the image is actually a labelset image, the pixel value of the active label of the active layer will be returned.
- Parameters
-
workingImage | The (labelset) image to retrieve the active pixel value of. |
◆ mitkClassMacroItkParent()
◆ MoveZerothContourTimeStep()
Move the contour in time step 0 to to a new contour model at the given time step.
◆ ProjectContourTo2DSlice()
Projects a contour onto an image point by point. Converts from world to index coordinates.
- Parameters
-
The documentation for this class was generated from the following file: