vtkMRMLDisplayNode.h

Go to the documentation of this file.
00001 /*=auto=========================================================================
00002 
00003   Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
00004 
00005   See Doc/copyright/copyright.txt
00006   or http://www.slicer.org/copyright/copyright.txt for details.
00007 
00008   Program:   3D Slicer
00009   Module:    $RCSfile: vtkMRMLDisplayNode.h,v $
00010   Date:      $Date: 2006/03/19 17:12:29 $
00011   Version:   $Revision: 1.3 $
00012 
00013 =========================================================================auto=*/
00017 
00018 #ifndef __vtkMRMLDisplayNode_h
00019 #define __vtkMRMLDisplayNode_h
00020 
00021 
00022 #include "vtkMRML.h"
00023 #include "vtkMRMLScene.h"
00024 #include "vtkMRMLNode.h"
00025 #include "vtkMRMLColorNode.h"
00026 
00027 #include "vtkImageData.h"
00028 #include "vtkPolyData.h"
00029 
00030 class vtkMRMLDisplayableNode;
00031 
00032 class VTK_MRML_EXPORT vtkMRMLDisplayNode : public vtkMRMLNode
00033 {
00034   public:
00035   static vtkMRMLDisplayNode *New(){return NULL;};
00036   vtkTypeMacro(vtkMRMLDisplayNode,vtkMRMLNode);
00037   void PrintSelf(ostream& os, vtkIndent indent);
00038 
00039   virtual vtkMRMLNode* CreateNodeInstance() = 0;
00040   
00043   virtual vtkPolyData* GetPolyData() {return NULL;};
00044   
00047   virtual vtkImageData* GetImageData() {return NULL;};
00048 
00051   virtual vtkMRMLDisplayableNode* GetDisplayableNode();
00052 
00055   virtual void UpdatePolyDataPipeline() {};
00056  
00059   virtual void UpdateImageDataPipeline() {};
00060  
00063   virtual void ReadXMLAttributes( const char** atts);
00064 
00067   virtual void WriteXML(ostream& of, int indent);
00068 
00071   virtual void Copy(vtkMRMLNode *node);
00072 
00073 
00076   virtual const char* GetNodeTagName() = 0;
00077 
00078 
00081   virtual void ProcessMRMLEvents ( vtkObject *caller, unsigned long event, void *callData );
00082 
00086   virtual void UpdateReferences();
00087 
00090   virtual void UpdateScene(vtkMRMLScene *scene);
00091   
00094   virtual void UpdateReferenceID(const char *oldID, const char *newID);
00095 
00098   vtkSetVector3Macro(Color, double);
00099   vtkGetVector3Macro(Color, double);
00100 
00103   vtkSetVector3Macro(SelectedColor, double);
00104   vtkGetVector3Macro(SelectedColor, double);
00107   vtkSetMacro(SelectedAmbient, double);
00108   vtkGetMacro(SelectedAmbient, double);
00111   vtkSetMacro(SelectedSpecular, double);
00112   vtkGetMacro(SelectedSpecular, double);
00113   
00116   vtkSetMacro(Opacity, double);
00117   vtkGetMacro(Opacity, double);
00118 
00121   vtkSetMacro(Ambient, double);
00122   vtkGetMacro(Ambient, double);
00123   
00126   vtkSetMacro(Diffuse, double);
00127   vtkGetMacro(Diffuse, double);
00128   
00131   vtkSetMacro(Specular, double);
00132   vtkGetMacro(Specular, double);
00133 
00136   vtkSetMacro(Power, double);
00137   vtkGetMacro(Power, double);
00138 
00141   vtkBooleanMacro(Visibility, int);
00142   vtkGetMacro(Visibility, int);
00143   vtkSetMacro(Visibility, int);
00144 
00147   vtkBooleanMacro(Clipping, int);
00148   vtkGetMacro(Clipping, int);
00149   vtkSetMacro(Clipping, int);
00150 
00153   vtkBooleanMacro(SliceIntersectionVisibility, int);
00154   vtkGetMacro(SliceIntersectionVisibility, int);
00155   vtkSetMacro(SliceIntersectionVisibility, int);
00156 
00159   vtkBooleanMacro(BackfaceCulling, int);
00160   vtkGetMacro(BackfaceCulling, int);
00161   vtkSetMacro(BackfaceCulling, int);
00162 
00165   vtkBooleanMacro(ScalarVisibility, int);
00166   vtkGetMacro(ScalarVisibility, int);
00167   vtkSetMacro(ScalarVisibility, int);
00168 
00171   vtkBooleanMacro(VectorVisibility, int);
00172   vtkGetMacro(VectorVisibility, int);
00173   vtkSetMacro(VectorVisibility, int);
00174 
00177   vtkBooleanMacro(TensorVisibility, int);
00178   vtkGetMacro(TensorVisibility, int);
00179   vtkSetMacro(TensorVisibility, int);
00180 
00181 
00184   vtkBooleanMacro(AutoScalarRange, int);
00185   vtkGetMacro(AutoScalarRange, int);
00186   vtkSetMacro(AutoScalarRange, int);
00187 
00190   vtkSetVector2Macro(ScalarRange, double);
00191   vtkGetVector2Macro(ScalarRange, double);
00192 
00193 
00196   vtkGetObjectMacro(TextureImageData, vtkImageData);
00197   void SetAndObserveTextureImageData(vtkImageData *ImageData);
00198 
00202   
00205   virtual void SetAndObserveColorNodeID(const char *ColorNodeID);
00206   //BTX
00207   virtual void SetAndObserveColorNodeID(const std::string& ColorNodeID);
00208   //ETX
00209   vtkGetStringMacro(ColorNodeID);
00210 
00213   virtual vtkMRMLColorNode* GetColorNode();
00214 
00217   vtkGetStringMacro(ActiveScalarName);
00220   void SetActiveScalarName(const char *scalarName);
00221     
00222   
00223   
00224   
00225 protected:
00226   vtkMRMLDisplayNode() ;
00227   ~vtkMRMLDisplayNode();
00228   vtkMRMLDisplayNode(const vtkMRMLDisplayNode&);
00229   void operator=(const vtkMRMLDisplayNode&);
00230   
00231   vtkSetObjectMacro(TextureImageData, vtkImageData);
00232   
00233   vtkImageData    *TextureImageData;
00234   
00235   char *ColorNodeID;
00236 
00237   char *ActiveScalarName;
00238   
00239   vtkSetReferenceStringMacro(ColorNodeID);
00240 
00241   vtkMRMLColorNode *ColorNode;
00242 
00244   double Opacity;
00245   double Ambient;
00246   double Diffuse;
00247   double Specular;
00248   double Power;
00249   double SelectedAmbient;
00250   double SelectedSpecular;
00251 
00253   int Visibility;
00254   int Clipping;
00255   int SliceIntersectionVisibility;
00256   int BackfaceCulling;
00257   int ScalarVisibility;
00258   int VectorVisibility;
00259   int TensorVisibility;
00260   int AutoScalarRange;
00261 
00263   double ScalarRange[2];
00264   double Color[3];
00265   double SelectedColor[3];
00266   
00267 };
00268 
00269 #endif
00270 

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1