ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cvConstrainedContourRepresentation Class Reference

Extended contour representation with instance label support. More...

#include <cvConstrainedContourRepresentation.h>

Inheritance diagram for cvConstrainedContourRepresentation:
Collaboration diagram for cvConstrainedContourRepresentation:

Public Member Functions

 vtkTypeMacro (cvConstrainedContourRepresentation, vtkOrientedGlyphContourRepresentation)
 
void SetLabelSuffix (const char *suffix)
 Set the label suffix to identify this contour instance. More...
 
const char * GetLabelSuffix () const
 Get the current label suffix. More...
 
void SetShowLabel (int show)
 Show or hide the instance label. More...
 
int GetShowLabel () const
 
void BuildRepresentation () override
 Build the representation (override to update label position) More...
 
void SetRenderer (vtkRenderer *ren) override
 Set the renderer (override to add label actor) More...
 
void SetVisibility (vtkTypeBool visible) override
 Set visibility (override to control label visibility) More...
 
vtkTextActor * GetLabelActor ()
 Get the label actor (for property access) More...
 

Static Public Member Functions

static cvConstrainedContourRepresentationNew ()
 

Protected Member Functions

 cvConstrainedContourRepresentation ()
 
 ~cvConstrainedContourRepresentation () override
 
void UpdateLabel ()
 Update the label text and position. More...
 

Detailed Description

Extended contour representation with instance label support.

Extends vtkOrientedGlyphContourRepresentation to add label suffix functionality, allowing multiple contour instances to be identified by their labels displayed in the VTK view.

Definition at line 21 of file cvConstrainedContourRepresentation.h.

Constructor & Destructor Documentation

◆ cvConstrainedContourRepresentation()

cvConstrainedContourRepresentation::cvConstrainedContourRepresentation ( )
protected

Definition at line 22 of file cvConstrainedContourRepresentation.cpp.

◆ ~cvConstrainedContourRepresentation()

cvConstrainedContourRepresentation::~cvConstrainedContourRepresentation ( )
overrideprotected

Definition at line 44 of file cvConstrainedContourRepresentation.cpp.

Member Function Documentation

◆ BuildRepresentation()

void cvConstrainedContourRepresentation::BuildRepresentation ( )
override

Build the representation (override to update label position)

Definition at line 117 of file cvConstrainedContourRepresentation.cpp.

References UpdateLabel().

Referenced by cvContourTool::setInstanceLabel().

◆ GetLabelActor()

vtkTextActor* cvConstrainedContourRepresentation::GetLabelActor ( )
inline

Get the label actor (for property access)

Definition at line 63 of file cvConstrainedContourRepresentation.h.

Referenced by cvContourTool::lockInteraction(), and cvContourTool::unlockInteraction().

◆ GetLabelSuffix()

const char * cvConstrainedContourRepresentation::GetLabelSuffix ( ) const

Get the current label suffix.

Definition at line 74 of file cvConstrainedContourRepresentation.cpp.

◆ GetShowLabel()

int cvConstrainedContourRepresentation::GetShowLabel ( ) const
inline

Definition at line 43 of file cvConstrainedContourRepresentation.h.

◆ New()

static cvConstrainedContourRepresentation* cvConstrainedContourRepresentation::New ( )
static

◆ SetLabelSuffix()

void cvConstrainedContourRepresentation::SetLabelSuffix ( const char *  suffix)

Set the label suffix to identify this contour instance.

Parameters
suffixThe suffix string (e.g., "#1", "#2")

Definition at line 57 of file cvConstrainedContourRepresentation.cpp.

References UpdateLabel().

Referenced by cvContourTool::setInstanceLabel().

◆ SetRenderer()

void cvConstrainedContourRepresentation::SetRenderer ( vtkRenderer *  ren)
override

Set the renderer (override to add label actor)

Definition at line 90 of file cvConstrainedContourRepresentation.cpp.

◆ SetShowLabel()

void cvConstrainedContourRepresentation::SetShowLabel ( int  show)

Show or hide the instance label.

Definition at line 79 of file cvConstrainedContourRepresentation.cpp.

◆ SetVisibility()

void cvConstrainedContourRepresentation::SetVisibility ( vtkTypeBool  visible)
override

Set visibility (override to control label visibility)

Definition at line 106 of file cvConstrainedContourRepresentation.cpp.

◆ UpdateLabel()

void cvConstrainedContourRepresentation::UpdateLabel ( )
protected

Update the label text and position.

Definition at line 126 of file cvConstrainedContourRepresentation.cpp.

Referenced by BuildRepresentation(), and SetLabelSuffix().

◆ vtkTypeMacro()

cvConstrainedContourRepresentation::vtkTypeMacro ( cvConstrainedContourRepresentation  ,
vtkOrientedGlyphContourRepresentation   
)

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