Slicer  5.1
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
vtkSlicerColorLogic Class Reference

#include <Modules/Loadable/Colors/Logic/vtkSlicerColorLogic.h>

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

Public Types

typedef vtkMRMLColorLogic Superclass
 
- Public Types inherited from vtkMRMLColorLogic
typedef vtkMRMLAbstractLogic Superclass
 
- Public Types inherited from vtkMRMLAbstractLogic
typedef vtkObject Superclass
 
typedef void(vtkMRMLAbstractLogic::* TaskFunctionPointer) (void *clientdata)
 

Public Member Functions

std::vector< std::string > FindDefaultColorFiles () override
 
std::vector< std::string > FindUserColorFiles () override
 
virtual const char * GetClassName ()
 
const char * GetDefaultChartColorNodeID () override
 Return a default color node id for the charts. More...
 
const char * GetDefaultEditorColorNodeID () override
 Return a default color node id for the editor. More...
 
const char * GetDefaultLabelMapColorNodeID () override
 Return a default color node id for a label map. More...
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
- Public Member Functions inherited from vtkMRMLColorLogic
void AddColorFile (const char *fileName, std::vector< std::string > *Files)
 Add a file to the input list Files, checking first for null, duplicates. More...
 
virtual void AddDefaultColorNodes ()
 Add default color nodes. More...
 
virtual const char * GetDefaultModelColorNodeID ()
 Return a default color node id for a model. More...
 
virtual const char * GetDefaultPlotColorNodeID ()
 Return a default color node id for a plot. More...
 
virtual const char * GetDefaultVolumeColorNodeID ()
 Return a default color node id for a volume. More...
 
virtual char * GetUserColorFilePaths ()
 Get/Set the user defined paths where to look for extra color files. More...
 
vtkMRMLColorNodeLoadColorFile (const char *fileName, const char *nodeName=nullptr)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void RemoveDefaultColorNodes ()
 Remove default color nodes. More...
 
virtual void SetUserColorFilePaths (const char *)
 
- Public Member Functions inherited from vtkMRMLAbstractLogic
virtual vtkMRMLApplicationLogicGetMRMLApplicationLogic () const
 Get access to overall application state. More...
 
vtkMRMLSceneGetMRMLScene () const
 Return a reference to the current MRML scene. More...
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void SetMRMLApplicationLogic (vtkMRMLApplicationLogic *logic)
 
void SetMRMLScene (vtkMRMLScene *newScene)
 Set and observe the MRMLScene. More...
 

Static Public Member Functions

static vtkMRMLColorLegendDisplayNodeAddDefaultColorLegendDisplayNode (vtkMRMLDisplayableNode *displayableNode)
 
static vtkMRMLColorLegendDisplayNodeAddDefaultColorLegendDisplayNode (vtkMRMLDisplayNode *displayNode)
 
static vtkMRMLColorLegendDisplayNodeGetColorLegendDisplayNode (vtkMRMLDisplayableNode *displayableNode)
 
static vtkMRMLColorLegendDisplayNodeGetColorLegendDisplayNode (vtkMRMLDisplayNode *displayNode)
 
static vtkMRMLColorLegendDisplayNodeGetNthColorLegendDisplayNode (vtkMRMLDisplayableNode *displayableNode, int n)
 
static int GetNumberOfColorLegendDisplayNodes (vtkMRMLDisplayableNode *displayableNode)
 
static int IsTypeOf (const char *type)
 
static vtkSlicerColorLogicNew ()
 The Usual vtk class functions. More...
 
static vtkSlicerColorLogicSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkMRMLColorLogic
static vtkMRMLColorTableNodeCopyNode (vtkMRMLColorNode *colorNode, const char *copyName)
 
static vtkMRMLProceduralColorNodeCopyProceduralNode (vtkMRMLColorNode *colorNode, const char *copyName)
 
static const char * GetColorTableNodeID (int type)
 Return the default color table node id for a given type. More...
 
static const char * GetdGEMRICColorNodeID (int type)
 Return the default dGEMRIC color node id for a given type. More...
 
static const char * GetFileColorNodeID (const char *fileName)
 Return a default color node id for a file based node, based on the file name. More...
 
static std::string GetFileColorNodeSingletonTag (const char *fileName)
 
static const char * GetPETColorNodeID (int type)
 Return the default PET color node id for a given type. More...
 
static const char * GetProceduralColorNodeID (const char *name)
 Return a default color node id for a procedural color node. More...
 
static int IsTypeOf (const char *type)
 
static vtkMRMLColorLogicNew ()
 The Usual vtk class functions. More...
 
static vtkMRMLColorLogicSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkMRMLAbstractLogic
static int IsTypeOf (const char *type)
 
static vtkMRMLAbstractLogicNew ()
 
static vtkMRMLAbstractLogicSafeDownCast (vtkObject *o)
 

Protected Member Functions

std::vector< std::string > FindColorFiles (const std::vector< std::string > &directories)
 
void operator= (const vtkSlicerColorLogic &)
 
void RegisterNodes () override
 Register MRML Node classes to Scene. Gets called automatically when the MRMLScene is attached to this logic class. More...
 
 vtkSlicerColorLogic ()
 
 vtkSlicerColorLogic (const vtkSlicerColorLogic &)
 
 ~vtkSlicerColorLogic () override
 
- Protected Member Functions inherited from vtkMRMLColorLogic
void AddDefaultFileNode (int i)
 
void AddDefaultFileNodes ()
 
void AddDefaultProceduralNodes ()
 
void AddDefaultTableNode (int i)
 
void AddDefaultTableNodes ()
 
void AddDGEMRICNode (int type)
 
void AddDGEMRICNodes ()
 
void AddLabelsNode ()
 
void AddPETNode (int type)
 
void AddPETNodes ()
 
void AddUserFileNode (int i)
 
void AddUserFileNodes ()
 
vtkMRMLColorTableNodeCreateDefaultFileNode (const std::string &colorname)
 
vtkMRMLColorTableNodeCreateDefaultTableNode (int type)
 
vtkMRMLdGEMRICProceduralColorNodeCreatedGEMRICColorNode (int type)
 
vtkMRMLColorTableNodeCreateFileNode (const char *fileName)
 
vtkMRMLColorTableNodeCreateLabelsNode ()
 
vtkMRMLPETProceduralColorNodeCreatePETColorNode (int type)
 
vtkMRMLProceduralColorNodeCreateProceduralFileNode (const char *fileName)
 
vtkMRMLProceduralColorNodeCreateRandomNode ()
 
vtkMRMLProceduralColorNodeCreateRedGreenBlueNode ()
 
vtkMRMLColorTableNodeCreateUserFileNode (const std::string &colorname)
 
virtual void OnMRMLSceneNewEvent ()
 
void operator= (const vtkMRMLColorLogic &)
 
std::string RemoveLeadAndTrailSpaces (std::string)
 
void SetMRMLSceneInternal (vtkMRMLScene *newScene) override
 Reimplemented to listen to specific scene events. More...
 
 vtkMRMLColorLogic ()
 
 vtkMRMLColorLogic (const vtkMRMLColorLogic &)
 
 ~vtkMRMLColorLogic () override
 
- Protected Member Functions inherited from vtkMRMLAbstractLogic
int EndModify (bool wasModifying)
 
virtual bool EnterMRMLLogicsCallback () const
 
virtual bool EnterMRMLNodesCallback () const
 
virtual bool EnterMRMLSceneCallback () const
 
bool GetDisableModifiedEvent () const
 
int GetInMRMLLogicsCallbackFlag () const
 
int GetInMRMLNodesCallbackFlag () const
 
int GetInMRMLSceneCallbackFlag () const
 
vtkCallbackCommand * GetMRMLLogicsCallbackCommand ()
 
vtkObserverManagerGetMRMLLogicsObserverManager () const
 
vtkCallbackCommand * GetMRMLNodesCallbackCommand ()
 
vtkObserverManagerGetMRMLNodesObserverManager () const
 
vtkCallbackCommand * GetMRMLSceneCallbackCommand ()
 
vtkObserverManagerGetMRMLSceneObserverManager () const
 
int GetPendingModifiedEventCount () const
 
int GetProcessingMRMLSceneEvent () const
 Return the event id currently processed or 0 if any. More...
 
int InvokePendingModifiedEvent ()
 
void Modified () override
 
virtual void ObserveMRMLScene ()
 
virtual void OnMRMLNodeModified (vtkMRMLNode *)
 
virtual void OnMRMLSceneEndBatchProcess ()
 
virtual void OnMRMLSceneEndClose ()
 
virtual void OnMRMLSceneEndImport ()
 
virtual void OnMRMLSceneEndRestore ()
 
virtual void OnMRMLSceneNew ()
 
virtual void OnMRMLSceneNodeAdded (vtkMRMLNode *)
 
virtual void OnMRMLSceneNodeRemoved (vtkMRMLNode *)
 
virtual void OnMRMLSceneStartBatchProcess ()
 
virtual void OnMRMLSceneStartClose ()
 
virtual void OnMRMLSceneStartImport ()
 
virtual void OnMRMLSceneStartRestore ()
 
virtual void ProcessMRMLLogicsEvents (vtkObject *caller, unsigned long event, void *callData)
 
virtual void ProcessMRMLNodesEvents (vtkObject *caller, unsigned long event, void *callData)
 
virtual void ProcessMRMLSceneEvents (vtkObject *caller, unsigned long event, void *callData)
 
void SetAndObserveMRMLSceneEventsInternal (vtkMRMLScene *newScene, vtkIntArray *events, vtkFloatArray *priorities=nullptr)
 
void SetDisableModifiedEvent (bool onOff)
 
void SetInMRMLLogicsCallbackFlag (int flag)
 
void SetInMRMLNodesCallbackFlag (int flag)
 
void SetInMRMLSceneCallbackFlag (int flag)
 
void SetProcessingMRMLSceneEvent (int event)
 
bool StartModify ()
 
virtual void UnobserveMRMLScene ()
 
virtual void UpdateFromMRMLScene ()
 
 vtkMRMLAbstractLogic ()
 
 ~vtkMRMLAbstractLogic () override
 

Static Protected Member Functions

static vtkMRMLDisplayNodeGetFirstNonColorLegendDisplayNode (vtkMRMLDisplayableNode *displayableNode)
 
- Static Protected Member Functions inherited from vtkMRMLColorLogic
static const char * GetColorNodeID (vtkMRMLColorNode *colorNode)
 
- Static Protected Member Functions inherited from vtkMRMLAbstractLogic
static void MRMLLogicsCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 MRMLLogicCallback is a static function to relay modified events from the logics. More...
 
static void MRMLNodesCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 MRMLNodesCallback is a static function to relay modified events from the nodes. More...
 
static void MRMLSceneCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 

Additional Inherited Members

- Protected Attributes inherited from vtkMRMLColorLogic
std::vector< std::string > ColorFiles
 
char * UserColorFilePaths
 
std::vector< std::string > UserColorFiles
 
- Static Protected Attributes inherited from vtkMRMLColorLogic
static std::string TempColorNodeID
 

Detailed Description

Definition at line 26 of file vtkSlicerColorLogic.h.

Member Typedef Documentation

◆ Superclass

Definition at line 33 of file vtkSlicerColorLogic.h.

Constructor & Destructor Documentation

◆ vtkSlicerColorLogic() [1/2]

vtkSlicerColorLogic::vtkSlicerColorLogic ( )
protected

◆ ~vtkSlicerColorLogic()

vtkSlicerColorLogic::~vtkSlicerColorLogic ( )
overrideprotected

◆ vtkSlicerColorLogic() [2/2]

vtkSlicerColorLogic::vtkSlicerColorLogic ( const vtkSlicerColorLogic )
protected

Member Function Documentation

◆ AddDefaultColorLegendDisplayNode() [1/2]

static vtkMRMLColorLegendDisplayNode* vtkSlicerColorLogic::AddDefaultColorLegendDisplayNode ( vtkMRMLDisplayableNode displayableNode)
static

Create a color legend display node for a displayable node and observe it. If there is already a color legend display node for the first (non-color-legend) display node then that is returned.

Parameters
displayableNode- displayable node for which color legend should be created.
Returns
the newly created (or already existing) color legend display node. Nullptr in case of an error.

◆ AddDefaultColorLegendDisplayNode() [2/2]

static vtkMRMLColorLegendDisplayNode* vtkSlicerColorLogic::AddDefaultColorLegendDisplayNode ( vtkMRMLDisplayNode displayNode)
static

Create a color legend display node for a display node and observe it. If there is already a color legend display node for that display node then a new node is not created but the existing node is returned.

Parameters
displayNode- display node for which color legend should be created
Returns
the newly created (or already existing) color legend display node. Nullptr in case of an error.

◆ FindColorFiles()

std::vector<std::string> vtkSlicerColorLogic::FindColorFiles ( const std::vector< std::string > &  directories)
protected

◆ FindDefaultColorFiles()

std::vector<std::string> vtkSlicerColorLogic::FindDefaultColorFiles ( )
overridevirtual

look for color files in the Base/Logic/Resources/ColorFiles directory and put their names in the ColorFiles list. Look in any user defined color files paths and put them in the UserColorFiles list.

Reimplemented from vtkMRMLColorLogic.

◆ FindUserColorFiles()

std::vector<std::string> vtkSlicerColorLogic::FindUserColorFiles ( )
overridevirtual

Reimplemented from vtkMRMLColorLogic.

◆ GetClassName()

virtual const char* vtkSlicerColorLogic::GetClassName ( )
virtual

Reimplemented from vtkMRMLColorLogic.

◆ GetColorLegendDisplayNode() [1/2]

static vtkMRMLColorLegendDisplayNode* vtkSlicerColorLogic::GetColorLegendDisplayNode ( vtkMRMLDisplayableNode displayableNode)
static

Get color legend node corresponding to the first valid display node of the input displayable node. Valid display node is any non-color-legend display node. If not found then nullptr is returned.

◆ GetColorLegendDisplayNode() [2/2]

static vtkMRMLColorLegendDisplayNode* vtkSlicerColorLogic::GetColorLegendDisplayNode ( vtkMRMLDisplayNode displayNode)
static

Get color legend node corresponding to a display node. If the displayable node has a designated primary display node then the corresponding color legend display node will be returned. Otherwise the first color legend display node will be returned that does not have any designated primary display node.

◆ GetDefaultChartColorNodeID()

const char* vtkSlicerColorLogic::GetDefaultChartColorNodeID ( )
overridevirtual

Return a default color node id for the charts.

Reimplemented from vtkMRMLColorLogic.

◆ GetDefaultEditorColorNodeID()

const char* vtkSlicerColorLogic::GetDefaultEditorColorNodeID ( )
overridevirtual

Return a default color node id for the editor.

Reimplemented from vtkMRMLColorLogic.

◆ GetDefaultLabelMapColorNodeID()

const char* vtkSlicerColorLogic::GetDefaultLabelMapColorNodeID ( )
overridevirtual

Return a default color node id for a label map.

Reimplemented from vtkMRMLColorLogic.

◆ GetFirstNonColorLegendDisplayNode()

static vtkMRMLDisplayNode* vtkSlicerColorLogic::GetFirstNonColorLegendDisplayNode ( vtkMRMLDisplayableNode displayableNode)
staticprotected

◆ GetNthColorLegendDisplayNode()

static vtkMRMLColorLegendDisplayNode* vtkSlicerColorLogic::GetNthColorLegendDisplayNode ( vtkMRMLDisplayableNode displayableNode,
int  n 
)
static

Return n-th color legend display node.

Parameters
displayableNodedisplayable node with color legend display nodes
ncolor legend node index
Returns
already existing color legend display node (or nullptr if there is no such display node)
See also
GetNumberOfColorLegendDisplayNodes

◆ GetNumberOfColorLegendDisplayNodes()

static int vtkSlicerColorLogic::GetNumberOfColorLegendDisplayNodes ( vtkMRMLDisplayableNode displayableNode)
static

Return number of color legend display nodes.

See also
GetNthColorLegendDisplayNode

◆ IsA()

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

Reimplemented from vtkMRMLColorLogic.

◆ IsTypeOf()

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

◆ New()

static vtkSlicerColorLogic* vtkSlicerColorLogic::New ( )
static

The Usual vtk class functions.

◆ operator=()

void vtkSlicerColorLogic::operator= ( const vtkSlicerColorLogic )
protected

◆ PrintSelf()

void vtkSlicerColorLogic::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
override

◆ RegisterNodes()

void vtkSlicerColorLogic::RegisterNodes ( )
overrideprotectedvirtual

Register MRML Node classes to Scene. Gets called automatically when the MRMLScene is attached to this logic class.

Reimplemented from vtkMRMLAbstractLogic.

◆ SafeDownCast()

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

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