vtkMRMLColorNode Class Reference

#include <vtkMRMLColorNode.h>

Inheritance diagram for vtkMRMLColorNode:
vtkMRMLStorableNode vtkMRMLTransformableNode vtkMRMLNode vtkObject vtkMRMLColorNodeTestHelper1 vtkMRMLColorTableNode vtkMRMLProceduralColorNode vtkMRMLColorTableNodeTestHelper1 vtkMRMLDiffusionTensorDisplayPropertiesNode vtkMRMLGlyphableVolumeDisplayPropertiesNode vtkMRMLdGEMRICProceduralColorNode vtkMRMLFreeSurferProceduralColorNode vtkMRMLPETProceduralColorNode vtkMRMLDiffusionTensorDisplayPropertiesNodeTestHelper1

List of all members.

Public Types

enum  { TypeModifiedEvent = 20002 }

Public Member Functions

void AddColorName (const char *name)
virtual void ApplyTransform (vtkMatrix4x4 *transformMatrix)
virtual void ApplyTransform (vtkAbstractTransform *vtkNotUsed(transform))
virtual bool CanApplyNonLinearTransforms ()
virtual void Copy (vtkMRMLNode *node)
virtual vtkMRMLStorageNodeCreateDefaultStorageNode ()
virtual vtkMRMLNodeCreateNodeInstance ()
 MRMLNode methods.
const charGetColorName (int ind)
std::string GetColorNameWithoutSpaces (int ind, const char *subst)
virtual int GetFirstType ()
virtual int GetLastType ()
virtual vtkLookupTableGetLookupTable ()
virtual const charGetNodeTagName ()
virtual const charGetTypeAsString ()
void PrintSelf (ostream &os, vtkIndent indent)
void ProcessMRMLEvents (vtkObject *caller, unsigned long event, void *callData)
virtual void ReadXMLAttributes (const char **atts)
virtual void Reset ()
int SetColorName (int ind, const char *name)
int SetColorNameWithSpaces (int ind, const char *name, const char *subst)
virtual void SetType (int type)
virtual void UpdateScene (vtkMRMLScene *scene)
 vtkBooleanMacro (NamesInitialised, int)
 vtkGetMacro (NamesInitialised, int)
 vtkGetMacro (Type, int)
 vtkGetStringMacro (NoName)
 vtkGetStringMacro (FileName)
 vtkSetMacro (NamesInitialised, int)
 vtkSetStringMacro (NoName)
 vtkSetStringMacro (FileName)
 vtkTypeMacro (vtkMRMLColorNode, vtkMRMLStorableNode)
virtual void WriteXML (ostream &of, int indent)

Static Public Member Functions

static vtkMRMLColorNodeNew ()

Protected Member Functions

void operator= (const vtkMRMLColorNode &)
virtual void SetNamesFromColors ()
 vtkMRMLColorNode (const vtkMRMLColorNode &)
 vtkMRMLColorNode ()
virtual ~vtkMRMLColorNode ()

Protected Attributes

charFileName
std::vector< std::string > Names
int NamesInitialised
charNoName
int Type

Detailed Description

vtkMRMLColorNode - MRML node to represent color information.

Color nodes describe colour look up tables. The tables may be pre-generated by Slicer (the label map colours, some default ramps, a random one) or created by a user. More than one model or label volume or editor can access the prebuilt nodes. This is used as a superclass for table based, procedural based, and implicit function based color nodes


Member Enumeration Documentation

anonymous enum

TypeModifiedEvent is generated when the type of the colour look up table changes

Enumerator:
TypeModifiedEvent 

Constructor & Destructor Documentation

vtkMRMLColorNode::vtkMRMLColorNode (  )  [protected]
vtkMRMLColorNode::~vtkMRMLColorNode (  )  [protected, virtual]

References FileName, and NoName.

vtkMRMLColorNode::vtkMRMLColorNode ( const vtkMRMLColorNode  )  [protected]

Member Function Documentation

void vtkMRMLColorNode::AddColorName ( const char name  ) 

Add a color name to the vector

References Names.

virtual void vtkMRMLColorNode::ApplyTransform ( vtkMatrix4x4 *  transformMatrix  )  [inline, virtual]

Reimplemented from vtkMRMLTransformableNode.

virtual void vtkMRMLColorNode::ApplyTransform ( vtkAbstractTransform *  vtkNotUsedtransform  )  [inline, virtual]
virtual bool vtkMRMLColorNode::CanApplyNonLinearTransforms (  )  [inline, virtual]
void vtkMRMLColorNode::Copy ( vtkMRMLNode node  )  [virtual]
virtual vtkMRMLStorageNode* vtkMRMLColorNode::CreateDefaultStorageNode (  )  [inline, virtual]

Create default storage node or NULL if does not have one

Reimplemented from vtkMRMLStorableNode.

Reimplemented in vtkMRMLColorTableNode, vtkMRMLdGEMRICProceduralColorNode, vtkMRMLPETProceduralColorNode, and vtkMRMLProceduralColorNode.

Referenced by ReadXMLAttributes().

vtkMRMLNode * vtkMRMLColorNode::CreateNodeInstance ( void   )  [virtual]
const char * vtkMRMLColorNode::GetColorName ( int  ind  ) 
std::string vtkMRMLColorNode::GetColorNameWithoutSpaces ( int  ind,
const char subst 
)

Get the 0th based nth name of this colour, replacing the spaces with subst

References GetColorName(), and slicerget::name.

Referenced by vtkMRMLColorTableStorageNode::WriteData(), vtkMRMLFreeSurferProceduralColorNode::WriteXML(), and vtkMRMLColorTableNode::WriteXML().

int vtkMRMLColorNode::GetFirstType (  )  [virtual]

Return the lowest and the highest type integers (defined in enum in subclass), for use in looping

Reimplemented in vtkMRMLColorTableNode, vtkMRMLdGEMRICProceduralColorNode, vtkMRMLFreeSurferProceduralColorNode, and vtkMRMLPETProceduralColorNode.

int vtkMRMLColorNode::GetLastType (  )  [virtual]
vtkLookupTable * vtkMRMLColorNode::GetLookupTable (  )  [virtual]
virtual const char* vtkMRMLColorNode::GetNodeTagName (  )  [inline, virtual]
const char * vtkMRMLColorNode::GetTypeAsString (  )  [virtual]
vtkMRMLColorNode * vtkMRMLColorNode::New (  )  [static]
void vtkMRMLColorNode::operator= ( const vtkMRMLColorNode  )  [protected]
void vtkMRMLColorNode::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
void vtkMRMLColorNode::ProcessMRMLEvents ( vtkObject caller,
unsigned long  event,
void *  callData 
) [virtual]

alternative method to propagate events generated in Storage nodes

Reimplemented from vtkMRMLStorableNode.

Reimplemented in vtkMRMLColorTableNode, vtkMRMLdGEMRICProceduralColorNode, vtkMRMLFreeSurferProceduralColorNode, vtkMRMLPETProceduralColorNode, and vtkMRMLProceduralColorNode.

void vtkMRMLColorNode::ReadXMLAttributes ( const char **  atts  )  [virtual]
void vtkMRMLColorNode::Reset (  )  [virtual]

Reset node attributes to the initilal state as defined in the constructor. NOTE: it preserves values several dynamic attributes that may be set by an application: type, name

Reimplemented from vtkMRMLNode.

Reimplemented in vtkMRMLColorTableNode.

int vtkMRMLColorNode::SetColorName ( int  ind,
const char name 
)
int vtkMRMLColorNode::SetColorNameWithSpaces ( int  ind,
const char name,
const char subst 
)

Set the 0th based nth name of this colour, replacing the subst character with spaces. Returns 1 on success, 0 on failure

References SetColorName().

Referenced by vtkMRMLFreeSurferProceduralColorNode::ReadXMLAttributes(), and vtkMRMLColorTableNode::ReadXMLAttributes().

void vtkMRMLColorNode::SetNamesFromColors (  )  [protected, virtual]

Set values in the names vector from the colours in the node

Reimplemented in vtkMRMLColorTableNode, vtkMRMLFreeSurferProceduralColorNode, and vtkMRMLProceduralColorNode.

Referenced by GetColorName().

void vtkMRMLColorNode::SetType ( int  type  )  [virtual]
void vtkMRMLColorNode::UpdateScene ( vtkMRMLScene scene  )  [virtual]
vtkMRMLColorNode::vtkBooleanMacro ( NamesInitialised  ,
int   
)
vtkMRMLColorNode::vtkGetMacro ( NamesInitialised  ,
int   
)

Get/Set for the flag on names array having been initalised

vtkMRMLColorNode::vtkGetMacro ( Type  ,
int   
)

Get for Type

Reimplemented in vtkMRMLColorTableNode.

vtkMRMLColorNode::vtkGetStringMacro ( NoName   ) 

get/set the string used for an unnamed colour

vtkMRMLColorNode::vtkGetStringMacro ( FileName   ) 
vtkMRMLColorNode::vtkSetMacro ( NamesInitialised  ,
int   
)
vtkMRMLColorNode::vtkSetStringMacro ( NoName   ) 
vtkMRMLColorNode::vtkSetStringMacro ( FileName   ) 

Name of the file name from which to read color information

vtkMRMLColorNode::vtkTypeMacro ( vtkMRMLColorNode  ,
vtkMRMLStorableNode   
)
void vtkMRMLColorNode::WriteXML ( ostream &  of,
int  indent 
) [virtual]

Member Data Documentation

std::vector<std::string> vtkMRMLColorNode::Names [protected]

Have the colour names been set? Used to do lazy copy of the Names array.

Referenced by Copy(), and vtkMRMLColorNode().

the string used for an unnamed colour

Referenced by Copy(), GetColorName(), PrintSelf(), vtkMRMLColorNode(), and ~vtkMRMLColorNode().


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

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1