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

#include <Libs/vtkSegmentationCore/vtkSegmentationHistory.h>

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

Classes

struct  SegmentationState
 

Public Types

typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual unsigned int GetMaximumNumberOfStates ()
 Get the limit of how many states may be stored. More...
 
virtual vtkSegmentationGetSegmentation ()
 Get segmentation that the states will be stored of. More...
 
virtual int IsA (const char *type)
 
bool IsRestoreNextStateAvailable ()
 
bool IsRestorePreviousStateAvailable ()
 
void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 
void RemoveAllStates ()
 Delete all states from memory. More...
 
bool RestoreNextState ()
 
bool RestorePreviousState ()
 
bool SaveState ()
 
void SetMaximumNumberOfStates (unsigned int maximumNumberOfStates)
 
void SetSegmentation (vtkSegmentation *segmentation)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkSegmentationHistoryNew ()
 
static vtkSegmentationHistorySafeDownCast (vtkObject *o)
 

Protected Types

typedef std::map< std::string, vtkSmartPointer< vtkSegment > > SegmentsMap
 Container type for segments. Maps segment IDs to segment objects. More...
 

Protected Member Functions

void CopySegment (vtkSegment *destination, vtkSegment *source, vtkSegment *baseline)
 
void operator= (const vtkSegmentationHistory &)
 
void RemoveAllNextStates ()
 Delete all states that are more recent than the last restored state. More...
 
void RemoveAllObsoleteStates ()
 Delete all old states so that we keep only up to MaximumNumberOfStates states. More...
 
bool RestoreState (unsigned int stateIndex)
 Restores a state defined by stateIndex. More...
 
 vtkSegmentationHistory ()
 
 ~vtkSegmentationHistory ()
 

Static Protected Member Functions

static void OnSegmentationModified (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 

Protected Attributes

unsigned int LastRestoredState
 
unsigned int MaximumNumberOfStates
 
bool RestoreStateInProgress
 
vtkSegmentationSegmentation
 
vtkCallbackCommand * SegmentationModifiedCallbackCommand
 
std::deque< SegmentationStateSegmentationStates
 

Detailed Description

Definition at line 40 of file vtkSegmentationHistory.h.

Member Typedef Documentation

◆ SegmentsMap

typedef std::map<std::string, vtkSmartPointer<vtkSegment> > vtkSegmentationHistory::SegmentsMap
protected

Container type for segments. Maps segment IDs to segment objects.

Definition at line 109 of file vtkSegmentationHistory.h.

◆ Superclass

Definition at line 44 of file vtkSegmentationHistory.h.

Constructor & Destructor Documentation

◆ vtkSegmentationHistory()

vtkSegmentationHistory::vtkSegmentationHistory ( )
protected

◆ ~vtkSegmentationHistory()

vtkSegmentationHistory::~vtkSegmentationHistory ( )
protected

Member Function Documentation

◆ CopySegment()

void vtkSegmentationHistory::CopySegment ( vtkSegment destination,
vtkSegment source,
vtkSegment baseline 
)
protected

Deep copies source segment to destination segment. If the same representation is found in baseline with up-to-date timestamp then the representation is reused from baseline.

◆ GetClassName()

virtual const char* vtkSegmentationHistory::GetClassName ( )
virtual

◆ GetMaximumNumberOfStates()

virtual unsigned int vtkSegmentationHistory::GetMaximumNumberOfStates ( )
virtual

Get the limit of how many states may be stored.

◆ GetSegmentation()

virtual vtkSegmentation* vtkSegmentationHistory::GetSegmentation ( )
virtual

Get segmentation that the states will be stored of.

◆ IsA()

virtual int vtkSegmentationHistory::IsA ( const char *  type)
virtual

◆ IsRestoreNextStateAvailable()

bool vtkSegmentationHistory::IsRestoreNextStateAvailable ( )

Check if it is possible to go restore the next state (redo).

Returns
True if the operation is allowed

◆ IsRestorePreviousStateAvailable()

bool vtkSegmentationHistory::IsRestorePreviousStateAvailable ( )

Check if it is possible to go back to a previous state (undo).

Returns
True if the operation is allowed

◆ IsTypeOf()

static int vtkSegmentationHistory::IsTypeOf ( const char *  type)
static

◆ New()

static vtkSegmentationHistory* vtkSegmentationHistory::New ( )
static

◆ OnSegmentationModified()

static void vtkSegmentationHistory::OnSegmentationModified ( vtkObject *  caller,
unsigned long  eid,
void *  clientData,
void *  callData 
)
staticprotected

Callback function called when the segmentation has been modified. It clears all states that are more recent than the last restored state.

◆ operator=()

void vtkSegmentationHistory::operator= ( const vtkSegmentationHistory )
protected

◆ PrintSelf()

void vtkSegmentationHistory::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

◆ RemoveAllNextStates()

void vtkSegmentationHistory::RemoveAllNextStates ( )
protected

Delete all states that are more recent than the last restored state.

◆ RemoveAllObsoleteStates()

void vtkSegmentationHistory::RemoveAllObsoleteStates ( )
protected

Delete all old states so that we keep only up to MaximumNumberOfStates states.

◆ RemoveAllStates()

void vtkSegmentationHistory::RemoveAllStates ( )

Delete all states from memory.

◆ RestoreNextState()

bool vtkSegmentationHistory::RestoreNextState ( )

Restores next state of the segmentation.

Returns
Success flag

◆ RestorePreviousState()

bool vtkSegmentationHistory::RestorePreviousState ( )

Restores previous state of the segmentation.

Returns
Success flag

◆ RestoreState()

bool vtkSegmentationHistory::RestoreState ( unsigned int  stateIndex)
protected

Restores a state defined by stateIndex.

◆ SafeDownCast()

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

◆ SaveState()

bool vtkSegmentationHistory::SaveState ( )

Saves all master representations of the segmentation in its current state. States more recent than the last restored state are removed.

Returns
Success flag

◆ SetMaximumNumberOfStates()

void vtkSegmentationHistory::SetMaximumNumberOfStates ( unsigned int  maximumNumberOfStates)

Limits how many states may be stored. If the number of stored states exceed the limit then the oldest state is removed.

◆ SetSegmentation()

void vtkSegmentationHistory::SetSegmentation ( vtkSegmentation segmentation)

Selects a segmentation that the states will be stored of. Current state of the segmentation is not stored.

Parameters
segmentationSegmentation to store. Deletes all stored states of the previously set segmentation.

Member Data Documentation

◆ LastRestoredState

unsigned int vtkSegmentationHistory::LastRestoredState
protected

Definition at line 125 of file vtkSegmentationHistory.h.

◆ MaximumNumberOfStates

unsigned int vtkSegmentationHistory::MaximumNumberOfStates
protected

Definition at line 120 of file vtkSegmentationHistory.h.

◆ RestoreStateInProgress

bool vtkSegmentationHistory::RestoreStateInProgress
protected

Definition at line 127 of file vtkSegmentationHistory.h.

◆ Segmentation

vtkSegmentation* vtkSegmentationHistory::Segmentation
protected

Definition at line 117 of file vtkSegmentationHistory.h.

◆ SegmentationModifiedCallbackCommand

vtkCallbackCommand* vtkSegmentationHistory::SegmentationModifiedCallbackCommand
protected

Definition at line 118 of file vtkSegmentationHistory.h.

◆ SegmentationStates

std::deque<SegmentationState> vtkSegmentationHistory::SegmentationStates
protected

Definition at line 119 of file vtkSegmentationHistory.h.


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