Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions
vtkSegmentationModifier Class Reference

Utility functions for resampling oriented image data. More...

#include <Libs/vtkSegmentationCore/vtkSegmentationModifier.h>

Inheritance diagram for vtkSegmentationModifier:
Inheritance graph
[legend]
Collaboration diagram for vtkSegmentationModifier:
Collaboration graph
[legend]

Public Types

enum  { MODE_REPLACE = 0, MODE_MERGE_MAX, MODE_MERGE_MIN, MODE_MERGE_MASK }
 
typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 

Static Public Member Functions

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 vtkSegmentationModifierNew ()
 
static vtkSegmentationModifierSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkSegmentationModifier ()
 
 ~vtkSegmentationModifier () override
 

Static Protected Member Functions

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)
 

Detailed Description

Utility functions for resampling oriented image data.

Definition at line 38 of file vtkSegmentationModifier.h.

Member Typedef Documentation

◆ Superclass

Definition at line 42 of file vtkSegmentationModifier.h.

Member Enumeration Documentation

◆ anonymous enum

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
mergeModeDetermines if the labelmap should replace the segment, combined with a maximum or minimum operation, or set under the mask.
extentIf 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.

Constructor & Destructor Documentation

◆ vtkSegmentationModifier()

vtkSegmentationModifier::vtkSegmentationModifier ( )
protected

◆ ~vtkSegmentationModifier()

vtkSegmentationModifier::~vtkSegmentationModifier ( )
overrideprotected

Member Function Documentation

◆ 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
extentAfirst input extent
extentAsecond input extent
extentIntersectioncomputed 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
segmentationNodeNode containing the segmentation
sharedSegmentIDSegment ID of the segment that contains the shared labelmap to be checked
maskMask labelmap
segmentIDsOutput list of segment IDs under the mask
includeInputSharedSegmentIDIf 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
Extentto be validated

◆ 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()

static vtkSegmentationModifier* vtkSegmentationModifier::New ( )
static

◆ SafeDownCast()

static vtkSegmentationModifier* vtkSegmentationModifier::SafeDownCast ( vtkObject *  o)
static

◆ 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: