Utility functions for resampling oriented image data.
More...
#include <Libs/vtkSegmentationCore/vtkSegmentationModifier.h>
|
static bool | GetSharedSegmentIDsInMask (vtkSegmentation *segmentation, std::string sharedSegmentID, vtkOrientedImageData *mask, const int extent[6], std::vector< std::string > &segmentIDs, int maskThreshold=0.0, bool includeInputSharedSegmentID=false) |
|
static int | IsTypeOf (const char *type) |
|
static bool | ModifyBinaryLabelmap (vtkOrientedImageData *labelmap, vtkSegmentation *segmentation, std::string segmentID, int mergeMode=MODE_REPLACE, const int extent[6]=nullptr, bool minimumOfAllSegments=false, bool masterRepresentationModifiedEnabled=false, const std::vector< std::string > segmentIdsToOverwrite={}, std::vector< std::string > *modifiedSegmentIDs=nullptr) |
|
static vtkSegmentationModifier * | New () |
|
static vtkSegmentationModifier * | SafeDownCast (vtkObject *o) |
|
|
static bool | AppendLabelmapToSegment (vtkOrientedImageData *labelmap, vtkSegmentation *segmentation, std::string segmentID, int mergeMode, const int extent[6], bool minimumOfAllSegments, std::vector< std::string > *modifiedSegmentIDs, bool &segmentLabelmapModified) |
|
static void | GetExtentIntersection (const int extentA[6], const int extentB[6], int extentIntersection[6]) |
|
static bool | IsExtentValid (int extent[6]) |
|
static void | SeparateModifiedSegmentFromSharedLabelmap (vtkOrientedImageData *labelmap, vtkSegmentation *segmentation, std::string segmentID, const int extent[6], const std::vector< std::string > &segmentIDsToOverwrite) |
|
static bool | SharedLabelmapShouldOverlap (vtkSegmentation *segmentation, std::string segmentID, std::vector< std::string > &segmentIDsToOverwrite) |
|
static void | ShrinkSegmentToEffectiveExtent (vtkOrientedImageData *segmentLabelmap) |
|
Utility functions for resampling oriented image data.
Definition at line 38 of file vtkSegmentationModifier.h.
◆ Superclass
◆ anonymous enum
Set a labelmap image as binary labelmap representation into the segment defined by the segmentation node and segment ID. Master representation must be binary labelmap! Master representation changed event is disabled to prevent deletion of all other representation in all segments. The other representations in the given segment are re-converted. The extent of the segment binary labelmap is shrunk to the effective extent. Display update is triggered.
- Parameters
-
mergeMode | Determines if the labelmap should replace the segment, combined with a maximum or minimum operation, or set under the mask. |
extent | If extent is specified then only that extent of the labelmap is used. |
Enumerator |
---|
MODE_REPLACE | |
MODE_MERGE_MAX | |
MODE_MERGE_MIN | |
MODE_MERGE_MASK | |
Definition at line 51 of file vtkSegmentationModifier.h.
◆ vtkSegmentationModifier()
vtkSegmentationModifier::vtkSegmentationModifier |
( |
| ) |
|
|
protected |
◆ ~vtkSegmentationModifier()
vtkSegmentationModifier::~vtkSegmentationModifier |
( |
| ) |
|
|
overrideprotected |
◆ AppendLabelmapToSegment()
static bool vtkSegmentationModifier::AppendLabelmapToSegment |
( |
vtkOrientedImageData * |
labelmap, |
|
|
vtkSegmentation * |
segmentation, |
|
|
std::string |
segmentID, |
|
|
int |
mergeMode, |
|
|
const int |
extent[6], |
|
|
bool |
minimumOfAllSegments, |
|
|
std::vector< std::string > * |
modifiedSegmentIDs, |
|
|
bool & |
segmentLabelmapModified |
|
) |
| |
|
staticprotected |
◆ GetClassName()
virtual const char* vtkSegmentationModifier::GetClassName |
( |
| ) |
|
|
virtual |
◆ GetExtentIntersection()
static void vtkSegmentationModifier::GetExtentIntersection |
( |
const int |
extentA[6], |
|
|
const int |
extentB[6], |
|
|
int |
extentIntersection[6] |
|
) |
| |
|
staticprotected |
Get the intersection of two extents. If any of the input extents are nullptr or empty (extent[i*2]>extent[i*2+1]) then the extent is considered to be infinite.
- Parameters
-
extentA | first input extent |
extentA | second input extent |
extentIntersection | computed intersection of the two input extents |
◆ GetSharedSegmentIDsInMask()
static bool vtkSegmentationModifier::GetSharedSegmentIDsInMask |
( |
vtkSegmentation * |
segmentation, |
|
|
std::string |
sharedSegmentID, |
|
|
vtkOrientedImageData * |
mask, |
|
|
const int |
extent[6], |
|
|
std::vector< std::string > & |
segmentIDs, |
|
|
int |
maskThreshold = 0.0 , |
|
|
bool |
includeInputSharedSegmentID = false |
|
) |
| |
|
static |
Get the list of segment IDs in the same shared labelmap that are contained within the mask
- Parameters
-
segmentationNode | Node containing the segmentation |
sharedSegmentID | Segment ID of the segment that contains the shared labelmap to be checked |
mask | Mask labelmap |
segmentIDs | Output list of segment IDs under the mask |
includeInputSharedSegmentID | If false, sharedSegmentID will not be added to the list of output segment IDs even if it is within the mask |
◆ IsA()
virtual int vtkSegmentationModifier::IsA |
( |
const char * |
type | ) |
|
|
virtual |
◆ IsExtentValid()
static bool vtkSegmentationModifier::IsExtentValid |
( |
int |
extent[6] | ) |
|
|
staticprotected |
Returns true if the extent is valid, false otherwise
- Parameters
-
◆ IsTypeOf()
static int vtkSegmentationModifier::IsTypeOf |
( |
const char * |
type | ) |
|
|
static |
◆ ModifyBinaryLabelmap()
static bool vtkSegmentationModifier::ModifyBinaryLabelmap |
( |
vtkOrientedImageData * |
labelmap, |
|
|
vtkSegmentation * |
segmentation, |
|
|
std::string |
segmentID, |
|
|
int |
mergeMode = MODE_REPLACE , |
|
|
const int |
extent[6] = nullptr , |
|
|
bool |
minimumOfAllSegments = false , |
|
|
bool |
masterRepresentationModifiedEnabled = false , |
|
|
const std::vector< std::string > |
segmentIdsToOverwrite = {} , |
|
|
std::vector< std::string > * |
modifiedSegmentIDs = nullptr |
|
) |
| |
|
static |
◆ New()
◆ SafeDownCast()
◆ SeparateModifiedSegmentFromSharedLabelmap()
static void vtkSegmentationModifier::SeparateModifiedSegmentFromSharedLabelmap |
( |
vtkOrientedImageData * |
labelmap, |
|
|
vtkSegmentation * |
segmentation, |
|
|
std::string |
segmentID, |
|
|
const int |
extent[6], |
|
|
const std::vector< std::string > & |
segmentIDsToOverwrite |
|
) |
| |
|
staticprotected |
◆ SharedLabelmapShouldOverlap()
static bool vtkSegmentationModifier::SharedLabelmapShouldOverlap |
( |
vtkSegmentation * |
segmentation, |
|
|
std::string |
segmentID, |
|
|
std::vector< std::string > & |
segmentIDsToOverwrite |
|
) |
| |
|
staticprotected |
◆ ShrinkSegmentToEffectiveExtent()
static void vtkSegmentationModifier::ShrinkSegmentToEffectiveExtent |
( |
vtkOrientedImageData * |
segmentLabelmap | ) |
|
|
staticprotected |
The documentation for this class was generated from the following file: