Static utility methods for working with contour models and images.
More...
#include <mitkContourModelUtils.h>
Static utility methods for working with contour models and images.
Provides projection, back-projection, and fill operations for contour models in relation to 2D image slices. These utilities support the segmentation workflow by converting between world and index coordinate contour representations and by filling contour regions into images.
- See also
- ContourModel, Image, LabelSetImage
Definition at line 35 of file mitkContourModelUtils.h.
◆ ContourModelUtils()
| mitk::ContourModelUtils::ContourModelUtils |
( |
| ) |
|
|
protected |
◆ ~ContourModelUtils()
| mitk::ContourModelUtils::~ContourModelUtils |
( |
| ) |
|
|
overrideprotected |
◆ BackProjectContourFrom2DSlice()
| static ContourModel::Pointer mitk::ContourModelUtils::BackProjectContourFrom2DSlice |
( |
const BaseGeometry * |
sliceGeometry, |
|
|
const ContourModel * |
contourIn2D |
|
) |
| |
|
static |
Back-project a 2D slice contour into 3D world coordinates.
Converts each vertex of the contour from slice index coordinates back to world coordinates using the provided geometry.
- Parameters
-
| [in] | sliceGeometry | The geometry of the 2D slice. |
| [in] | contourIn2D | The contour in slice index coordinates. |
- Returns
- A new ContourModel with vertices in world (3D) coordinates.
◆ 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
◆ mitkClassMacroItkParent()
◆ MoveZerothContourTimeStep()
| static ContourModel::Pointer mitk::ContourModelUtils::MoveZerothContourTimeStep |
( |
const ContourModel * |
contour, |
|
|
TimeStepType |
timeStep |
|
) |
| |
|
static |
Create a new contour model with the contour from time step 0 placed at the specified time step.
- Parameters
-
| [in] | contour | The source contour model whose time step 0 data is used. |
| [in] | timeStep | The destination time step in the new contour model. |
- Returns
- A new ContourModel containing the contour at the specified time step.
◆ ProjectContourTo2DSlice()
| static ContourModel::Pointer mitk::ContourModelUtils::ProjectContourTo2DSlice |
( |
const Image * |
slice, |
|
|
const ContourModel * |
contourIn3D |
|
) |
| |
|
static |
Project a 3D contour onto a 2D image slice.
Converts each vertex of the contour from world coordinates to index coordinates of the given slice.
- Parameters
-
| [in] | slice | The 2D image slice providing the geometry for projection. |
| [in] | contourIn3D | The contour in world (3D) coordinates. |
- Returns
- A new ContourModel with vertices in slice index coordinates.
The documentation for this class was generated from the following file: