Slicer
5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
MRML logic class for color manipulation. More...
#include <Libs/MRML/Logic/vtkMRMLColorLogic.h>
Public Types | |
typedef vtkMRMLAbstractLogic | Superclass |
Public Types inherited from vtkMRMLAbstractLogic | |
typedef vtkObject | Superclass |
typedef void(vtkMRMLAbstractLogic::* | TaskFunctionPointer) (void *clientdata) |
Public Member Functions | |
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 * | GetClassName () |
virtual const char * | GetDefaultChartColorNodeID () |
Return a default color node id for a chart. More... | |
virtual const char * | GetDefaultEditorColorNodeID () |
Return a default color node id for the editor. More... | |
virtual const char * | GetDefaultLabelMapColorNodeID () |
Return a default color node id for a label map. 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... | |
virtual int | IsA (const char *type) |
vtkMRMLColorNode * | LoadColorFile (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 vtkMRMLApplicationLogic * | GetMRMLApplicationLogic () const |
Get access to overall application state. More... | |
vtkMRMLScene * | GetMRMLScene () 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 vtkMRMLColorTableNode * | CopyNode (vtkMRMLColorNode *colorNode, const char *copyName) |
static vtkMRMLProceduralColorNode * | CopyProceduralNode (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 vtkMRMLColorLogic * | New () |
The Usual vtk class functions. More... | |
static vtkMRMLColorLogic * | SafeDownCast (vtkObject *o) |
Static Public Member Functions inherited from vtkMRMLAbstractLogic | |
static int | IsTypeOf (const char *type) |
static vtkMRMLAbstractLogic * | New () |
static vtkMRMLAbstractLogic * | SafeDownCast (vtkObject *o) |
Static Protected Member Functions | |
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) |
Protected Attributes | |
std::vector< std::string > | ColorFiles |
char * | UserColorFilePaths |
std::vector< std::string > | UserColorFiles |
Static Protected Attributes | |
static std::string | TempColorNodeID |
MRML logic class for color manipulation.
This class manages the logic associated with reading, saving, and changing propertied of the colors.
Definition at line 33 of file vtkMRMLColorLogic.h.
Definition at line 39 of file vtkMRMLColorLogic.h.
|
protected |
|
overrideprotected |
|
protected |
void vtkMRMLColorLogic::AddColorFile | ( | const char * | fileName, |
std::vector< std::string > * | Files | ||
) |
Add a file to the input list Files, checking first for null, duplicates.
|
virtual |
Add default color nodes.
The default color nodes are singleton and are not included in the the saved scene.
This function enables the vtkMRMLScene::BatchProcessState.
The type of default nodes along with their properties are listed in the table below:
Family | Category | Type | Node name | Singleton Tag | Node ID |
---|---|---|---|---|---|
ColorTable | Discrete | Labels | Labels | Labels | vtkMRMLColorTableNodeLabels |
ColorTable | Discrete | FullRainbow | FullRainbow | FullRainbow | vtkMRMLColorTableNodeFullRainbow |
ColorTable | Discrete | Grey | Grey | Grey | vtkMRMLColorTableNodeGrey |
ColorTable | Discrete | Iron | Iron | Iron | vtkMRMLColorTableNodeIron |
ColorTable | Discrete | Rainbow | Rainbow | Rainbow | vtkMRMLColorTableNodeRainbow |
ColorTable | Discrete | Ocean | Ocean | Ocean | vtkMRMLColorTableNodeOcean |
ColorTable | Discrete | Desert | Desert | Desert | vtkMRMLColorTableNodeDesert |
ColorTable | Discrete | InvertedGrey | InvertedGrey | InvertedGrey | vtkMRMLColorTableNodeInvertedGrey |
ColorTable | Discrete | ReverseRainbow | ReverseRainbow | ReverseRainbow | vtkMRMLColorTableNodeReverseRainbow |
ColorTable | Discrete | fMRI | fMRI | fMRI | vtkMRMLColorTableNodefMRI |
ColorTable | Discrete | fMRIPA | fMRIPA | fMRIPA | vtkMRMLColorTableNodefMRIPA |
ColorTable | Discrete | Random | Random | Random | vtkMRMLColorTableNodeRandom |
ColorTable | Discrete | Red | Red | Red | vtkMRMLColorTableNodeRed |
ColorTable | Discrete | Green | Green | Green | vtkMRMLColorTableNodeGreen |
ColorTable | Discrete | Blue | Blue | Blue | vtkMRMLColorTableNodeBlue |
ColorTable | Discrete | Yellow | Yellow | Yellow | vtkMRMLColorTableNodeYellow |
ColorTable | Discrete | Cyan | Cyan | Cyan | vtkMRMLColorTableNodeCyan |
ColorTable | Discrete | Magenta | Magenta | Magenta | vtkMRMLColorTableNodeMagenta |
ColorTable | Discrete | Warm1 | Warm1 | Warm1 | vtkMRMLColorTableNodeWarm1 |
ColorTable | Discrete | Warm2 | Warm2 | Warm2 | vtkMRMLColorTableNodeWarm2 |
ColorTable | Discrete | Warm3 | Warm3 | Warm3 | vtkMRMLColorTableNodeWarm3 |
ColorTable | Discrete | Cool1 | Cool1 | Cool1 | vtkMRMLColorTableNodeCool1 |
ColorTable | Discrete | Cool2 | Cool2 | Cool2 | vtkMRMLColorTableNodeCool2 |
ColorTable | Discrete | Cool3 | Cool3 | Cool3 | vtkMRMLColorTableNodeCool3 |
ColorTable | Shade | WarmShade1 | WarmShade1 | WarmShade1 | vtkMRMLColorTableNodeWarmShade1 |
ColorTable | Shade | WarmShade2 | WarmShade2 | WarmShade2 | vtkMRMLColorTableNodeWarmShade2 |
ColorTable | Shade | WarmShade3 | WarmShade3 | WarmShade3 | vtkMRMLColorTableNodeWarmShade3 |
ColorTable | Shade | CoolShade1 | CoolShade1 | CoolShade1 | vtkMRMLColorTableNodeCoolShade1 |
ColorTable | Shade | CoolShade2 | CoolShade2 | CoolShade2 | vtkMRMLColorTableNodeCoolShade2 |
ColorTable | Shade | CoolShade3 | CoolShade3 | CoolShade3 | vtkMRMLColorTableNodeCoolShade3 |
ColorTable | Tint | WarmTint1 | WarmTint1 | WarmTint1 | vtkMRMLColorTableNodeWarmTint1 |
ColorTable | Tint | WarmTint2 | WarmTint2 | WarmTint2 | vtkMRMLColorTableNodeWarmTint2 |
ColorTable | Tint | WarmTint3 | WarmTint3 | WarmTint3 | vtkMRMLColorTableNodeWarmTint3 |
ColorTable | Tint | CoolTint1 | CoolTint1 | CoolTint1 | vtkMRMLColorTableNodeCoolTint1 |
ColorTable | Tint | CoolTint2 | CoolTint2 | CoolTint2 | vtkMRMLColorTableNodeCoolTint2 |
ColorTable | Tint | CoolTint3 | CoolTint3 | CoolTint3 | vtkMRMLColorTableNodeCoolTint3 |
ProceduralColor | Discrete | RandomIntegers | RandomIntegers | RandomIntegers | vtkMRMLProceduralColorNodeRandomIntegers |
ProceduralColor | Continuous | RedGreenBlue | RedGreenBlue | RedGreenBlue | vtkMRMLProceduralColorNodeRedGreenBlue |
PETProceduralColor | PET | PET-Heat | PET-Heat | PET-Heat | vtkMRMLPETProceduralColorNodePET-Heat |
PETProceduralColor | PET | PET-Rainbow | PET-Rainbow | PET-Rainbow | vtkMRMLPETProceduralColorNodePET-Rainbow |
PETProceduralColor | PET | PET-MaximumIntensityProjection | PET-MaximumIntensityProjection | PET-MaximumIntensityProjection | vtkMRMLPETProceduralColorNodePET-MaximumIntensityProjection |
dGEMRICProceduralColor | Cartilage MRI | dGEMRIC-1.5T | dGEMRIC-1.5T | dGEMRIC-1.5T | vtkMRMLdGEMRICProceduralColorNodedGEMRIC-1.5T |
dGEMRICProceduralColor | Cartilage MRI | dGEMRIC-3T | dGEMRIC-3T | dGEMRIC-3T | vtkMRMLdGEMRICProceduralColorNodedGEMRIC-3T |
ColorTable | Default Labels from File | File | LightPaleChartColors | FileLightPaleChartColors.txt | vtkMRMLColorTableNodeFileLightPaleChartColors.txt |
ColorTable | Default Labels from File | File | ColdToHotRainbow | FileColdToHotRainbow.txt | vtkMRMLColorTableNodeFileColdToHotRainbow.txt |
ColorTable | Default Labels from File | File | Viridis | FileViridis.txt | vtkMRMLColorTableNodeFileViridis.txt |
ColorTable | Default Labels from File | File | Magma | FileMagma.txt | vtkMRMLColorTableNodeFileMagma.txt |
ColorTable | Default Labels from File | File | DivergingBlueRed | FileDivergingBlueRed.txt | vtkMRMLColorTableNodeFileDivergingBlueRed.txt |
ColorTable | Default Labels from File | File | HotToColdRainbow | FileHotToColdRainbow.txt | vtkMRMLColorTableNodeFileHotToColdRainbow.txt |
ColorTable | Default Labels from File | File | DarkBrightChartColors | FileDarkBrightChartColors.txt | vtkMRMLColorTableNodeFileDarkBrightChartColors.txt |
ColorTable | Default Labels from File | File | MediumChartColors | FileMediumChartColors.txt | vtkMRMLColorTableNodeFileMediumChartColors.txt |
ColorTable | Default Labels from File | File | Slicer3_2010_Label_Colors | FileSlicer3_2010_Label_Colors.txt | vtkMRMLColorTableNodeFileSlicer3_2010_Label_Colors.txt |
ColorTable | Default Labels from File | File | Slicer3_2010_Brain_Labels | FileSlicer3_2010_Brain_Labels.txt | vtkMRMLColorTableNodeFileSlicer3_2010_Brain_Labels.txt |
ColorTable | Default Labels from File | File | Inferno | FileInferno.txt | vtkMRMLColorTableNodeFileInferno.txt |
ColorTable | Default Labels from File | File | PelvisColor | FilePelvisColor.txt | vtkMRMLColorTableNodeFilePelvisColor.txt |
ColorTable | Default Labels from File | File | SPL-BrainAtlas-ColorFile | FileSPL-BrainAtlas-ColorFile.txt | vtkMRMLColorTableNodeFileSPL-BrainAtlas-ColorFile.txt |
ColorTable | Default Labels from File | File | AbdomenColors | FileAbdomenColors.txt | vtkMRMLColorTableNodeFileAbdomenColors.txt |
ColorTable | None | File | GenericColors | FileGenericColors.txt | vtkMRMLColorTableNodeFileGenericColors.txt |
ColorTable | Default Labels from File | File | 64Color-Nonsemantic | File64Color-Nonsemantic.txt | vtkMRMLColorTableNodeFile64Color-Nonsemantic.txt |
ColorTable | Default Labels from File | File | Plasma | FilePlasma.txt | vtkMRMLColorTableNodeFilePlasma.txt |
ColorTable | Default Labels from File | File | Cividis | FileCividis.txt | vtkMRMLColorTableNodeFileCividis.txt |
ColorTable | Default Labels from File | File | SPL-BrainAtlas-2009-ColorFile | FileSPL-BrainAtlas-2009-ColorFile.txt | vtkMRMLColorTableNodeFileSPL-BrainAtlas-2009-ColorFile.txt |
ColorTable | Default Labels from File | File | SPL-BrainAtlas-2012-ColorFile | FileSPL-BrainAtlas-2012-ColorFile.txt | vtkMRMLColorTableNodeFileSPL-BrainAtlas-2012-ColorFile.txt |
ColorTable | None | File | GenericAnatomyColors | FileGenericAnatomyColors.txt | vtkMRMLColorTableNodeFileGenericAnatomyColors.txt |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
Returns a vtkMRMLColorTableNode copy (type = vtkMRMLColorTableNode::User) of the color node. The node is not added to the scene and you are responsible for deleting it.
|
static |
Returns a vtkMRMLProceduralColorNode copy (type = vtkMRMLColorTableNode::User) of the color node. The node is not added to the scene and you are responsible for deleting it. If there is no color transfer function on the input node, for example if it's a color table node, it will return a procedural node with a blank color transfer function.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
Reimplemented in vtkSlicerColorLogic.
|
protectedvirtual |
Reimplemented in vtkSlicerColorLogic.
|
virtual |
Reimplemented from vtkMRMLAbstractLogic.
Reimplemented in vtkSlicerColorLogic.
|
staticprotected |
Return the ID of a node that doesn't belong to a scene. It is the concatenation of the node class name and its type.
|
static |
Return the default color table node id for a given type.
|
virtual |
Return a default color node id for a chart.
Reimplemented in vtkSlicerColorLogic.
|
virtual |
Return a default color node id for the editor.
Reimplemented in vtkSlicerColorLogic.
|
virtual |
Return a default color node id for a label map.
Reimplemented in vtkSlicerColorLogic.
|
virtual |
Return a default color node id for a model.
|
virtual |
Return a default color node id for a plot.
|
virtual |
Return a default color node id for a volume.
|
static |
Return the default dGEMRIC color node id for a given type.
|
static |
Return a default color node id for a file based node, based on the file name.
|
static |
|
static |
Return the default PET color node id for a given type.
|
static |
Return a default color node id for a procedural color node.
|
virtual |
Get/Set the user defined paths where to look for extra color files.
|
virtual |
Reimplemented from vtkMRMLAbstractLogic.
Reimplemented in vtkSlicerColorLogic.
|
static |
vtkMRMLColorNode* vtkMRMLColorLogic::LoadColorFile | ( | const char * | fileName, |
const char * | nodeName = nullptr |
||
) |
Load in a color file, creating a storage node. Returns a pointer to the created node on success, 0 on failure (no file, invalid color file). The name of the created color node is nodeName if specified or the fileName otherwise. Try first to load it as a color table node, then if that fails, as a procedural color node. It calls CreateFileNode or CreateProceduralFileNode which are also used for the built in color nodes, so it has to unset some flags: set the category to File, turn save with scene on on the node and it's storage node, turn off hide from editors, remove the singleton tag.
|
static |
The Usual vtk class functions.
|
protectedvirtual |
Called when the scene fires vtkMRMLScene::NewSceneEvent. We add the default LUTs.
|
protected |
|
override |
|
virtual |
Remove default color nodes.
|
protected |
|
static |
|
overrideprotectedvirtual |
Reimplemented to listen to specific scene events.
Reimplemented from vtkMRMLAbstractLogic.
|
virtual |
|
protected |
a vector holding discovered default color files, found in the Resources/ColorFiles directory, white space separated with: int name r g b a with rgba in the range 0-255
Definition at line 259 of file vtkMRMLColorLogic.h.
|
staticprotected |
Definition at line 269 of file vtkMRMLColorLogic.h.
|
protected |
a string holding delimiter separated (; on win32, : else) paths where to look for extra color files, set from the return value of vtkMRMLApplication::GetColorFilePaths
Definition at line 267 of file vtkMRMLColorLogic.h.
|
protected |
a vector holding discovered user defined color files, found in the UserColorFilesPath directories.
Definition at line 263 of file vtkMRMLColorLogic.h.