15 #ifndef __vtkMRMLVolumeNode_h 16 #define __vtkMRMLVolumeNode_h 23 class vtkAlgorithmOutput;
24 class vtkEventForwarderCommand;
29 #include "itkMetaDataDictionary.h" 44 void PrintSelf(ostream& os, vtkIndent indent)
override;
63 void WriteXML(ostream& of,
int indent)
override;
92 static bool ComputeIJKToRASFromScanOrder(
const char *order,
93 const double* spacing,
96 vtkMatrix4x4 *IJKToRAS);
98 static const char* ComputeScanOrderFromIJKToRAS(vtkMatrix4x4 *IJKToRAS);
100 void SetIJKToRASDirections(
double dirs[3][3]);
101 void SetIJKToRASDirections(
double ir,
double ia,
double is,
102 double jr,
double ja,
double js,
103 double kr,
double ka,
double ks);
104 void SetIToRASDirection(
double ir,
double ia,
double is);
105 void SetJToRASDirection(
double jr,
double ja,
double js);
106 void SetKToRASDirection(
double kr,
double ka,
double ks);
108 void GetIJKToRASDirections(
double dirs[3][3]);
109 void GetIToRASDirection(
double dirs[3]);
110 void GetJToRASDirection(
double dirs[3]);
111 void GetKToRASDirection(
double dirs[3]);
118 vtkGetVector3Macro (Spacing,
double);
119 virtual void SetSpacing(
double arg1,
double arg2,
double arg3);
120 virtual void SetSpacing(
double arg[3]);
121 vtkGetVector3Macro (Origin,
double);
122 virtual void SetOrigin(
double arg1,
double arg2,
double arg3);
123 virtual void SetOrigin(
double arg[3]);
127 double GetMinSpacing();
131 double GetMaxSpacing();
137 void GetIJKToRASMatrix(vtkMatrix4x4* mat);
138 void GetRASToIJKMatrix(vtkMatrix4x4* mat);
140 void GetIJKToRASDirectionMatrix(vtkMatrix4x4* mat);
141 void SetIJKToRASDirectionMatrix(vtkMatrix4x4* mat);
146 void SetIJKToRASMatrix(vtkMatrix4x4* mat);
147 void SetRASToIJKMatrix(vtkMatrix4x4* mat);
160 void GetBounds(
double bounds[6])
override;
168 void GetSliceBounds(
double bounds[6], vtkMatrix4x4* rasToSlice,
bool useVoxelCenter =
false);
184 virtual void SetAndObserveImageData(vtkImageData *ImageData);
185 virtual vtkImageData* GetImageData();
189 virtual void SetImageDataConnection(vtkAlgorithmOutput *inputPort);
191 vtkGetObjectMacro(ImageDataConnection, vtkAlgorithmOutput);
197 void ShiftImageDataExtentToZeroStart();
208 ImageDataModifiedEvent = 18001
213 void SetMetaDataDictionary(
const itk::MetaDataDictionary& );
214 const itk::MetaDataDictionary& GetMetaDataDictionary()
const;
222 virtual void ApplyNonLinearTransform(vtkAbstractTransform* transform);
230 virtual double GetImageBackgroundScalarComponentAsDouble(
int component);
240 bool AddCenteringTransform();
248 vtkGetMacro(VoxelVectorType,
int);
249 vtkSetMacro(VoxelVectorType,
int);
252 static const char *GetVoxelVectorTypeAsString(
int id);
253 static int GetVoxelVectorTypeFromString(
const char *name);
262 void SetImageDataToDisplayNodes();
282 virtual void GetBoundsInternal(
double bounds[6], vtkMatrix4x4* rasToSlice,
bool useTransform,
bool useVoxelCenter =
false);
286 void GetCenterPositionRAS(
double* centerPositionRAS,
bool useParentTransform=
true);
289 double IJKToRASDirections[3][3];
void ProcessMRMLEvents(vtkObject *, unsigned long, void *) override
alternative method to propagate events generated in Display nodes
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
vtkEventForwarderCommand * DataEventForwarder
MRML node for representing a volume display attributes.
virtual void GetBounds(double bounds[6])
virtual bool GetModifiedSinceRead()
void OnNodeReferenceAdded(vtkMRMLNodeReference *reference) override
Called when a node reference ID is added (list size increased).
virtual void CreateDefaultSequenceDisplayNodes()
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
void operator=(const vtkMRMLDisplayableNode &)
A set of MRML Nodes that supports serialization and undo/redo.
void PrintSelf(ostream &os, vtkIndent indent) override
const char * GetNodeTagName() override=0
Get node XML tag name (like Volume, Model)
MRML node for representing a volume (image stack).
vtkAlgorithmOutput * ImageDataConnection
vtkMRMLNode * CreateNodeInstance() override=0
MRMLNode methods.
itk::MetaDataDictionary Dictionary
vtkMRMLCopyContentMacro(vtkMRMLStorableNode)
Abstract class that contains graphical display properties for displayable nodes.
void UpdateScene(vtkMRMLScene *scene) override
Finds the storage node and read the data
Abstract Superclass for all specific types of MRML nodes.
void OnNodeReferenceModified(vtkMRMLNodeReference *reference) override
Called when a node reference ID is modified.
virtual void GetRASBounds(double bounds[6])