vtkMRMLVolumePropertyNode.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #ifndef __vtkMRMLVolumePropertyNode_h
00007 #define __vtkMRMLVolumePropertyNode_h
00008
00009 #include "vtkMRML.h"
00010 #include "vtkMRMLDisplayNode.h"
00011
00012 #include "vtkVolumeProperty.h"
00013 #include "vtkPiecewiseFunction.h"
00014 #include "vtkColorTransferFunction.h"
00015
00016 #include <string>
00017 #include <vtksys/stl/vector>
00018
00019 #define COUNT_CROPPING_REGION_PLANES 6
00020
00021 class VTK_MRML_EXPORT vtkMRMLVolumePropertyNode : public vtkMRMLStorableNode
00022 {
00023 public:
00024
00026
00027
00028
00029
00032
00033 std::string GetPiecewiseFunctionString(vtkPiecewiseFunction* function);
00034
00037
00038 std::string GetColorTransferFunctionString(vtkColorTransferFunction* function);
00039
00042 void GetPiecewiseFunctionFromString(std::string str,vtkPiecewiseFunction* result);
00043
00046 void GetColorTransferFunctionFromString(std::string str, vtkColorTransferFunction* result);
00047
00048
00049
00052 static vtkMRMLVolumePropertyNode *New();
00053 vtkTypeMacro(vtkMRMLVolumePropertyNode,vtkMRMLStorableNode);
00054 void PrintSelf(ostream& os, vtkIndent indent);
00055
00056 vtkGetObjectMacro(VolumeProperty,vtkVolumeProperty);
00057
00058
00060
00061
00062 virtual vtkMRMLNode* CreateNodeInstance();
00063
00066 virtual void ReadXMLAttributes( const char** atts);
00067
00070 virtual void WriteXML(ostream& of, int indent);
00071
00074 virtual void Copy(vtkMRMLNode *node);
00075
00078 virtual void UpdateScene(vtkMRMLScene *scene){
00079 Superclass::UpdateScene(scene);
00080 };
00081
00082
00083
00084 void CopyParameterSet(vtkMRMLNode *node);
00085
00088 virtual const char* GetNodeTagName() {return "VolumeProperty";};
00089
00092
00093 virtual void ProcessMRMLEvents ( vtkObject *caller, unsigned long event, void *callData);
00094
00097 virtual bool CanApplyNonLinearTransforms() { return false; }
00098 virtual void ApplyTransform(vtkMatrix4x4* vtkNotUsed(transformMatrix)) {};
00099 virtual void ApplyTransform(vtkAbstractTransform* vtkNotUsed(transform)) {};
00100
00103 virtual vtkMRMLStorageNode* CreateDefaultStorageNode();
00104
00107 void GetPiecewiseFunctionFromString(char *str,vtkPiecewiseFunction* result)
00108 {
00109 this->GetPiecewiseFunctionFromString(std::string (str), result);
00110 };
00111
00114 void GetColorTransferFunctionFromString(char *str, vtkColorTransferFunction* result)
00115 {
00116 GetColorTransferFunctionFromString(std::string (str), result);
00117 };
00118
00119 protected:
00122 vtkMRMLVolumePropertyNode(void);
00125 ~vtkMRMLVolumePropertyNode(void);
00126
00129 vtkVolumeProperty* VolumeProperty;
00130
00131 private:
00134 vtkMRMLVolumePropertyNode(const vtkMRMLVolumePropertyNode&);
00135 void operator=(const vtkMRMLVolumePropertyNode&);
00136
00137 };
00138
00139 #endif