15#ifndef __vtkMRMLVolumeNode_h
16#define __vtkMRMLVolumeNode_h
23class vtkAlgorithmOutput;
24class vtkEventForwarderCommand;
29#include "itkMetaDataDictionary.h"
44 void PrintSelf(ostream& os, vtkIndent indent)
override;
63 void WriteXML(ostream& of,
int indent)
override;
93 const double* spacing,
96 vtkMatrix4x4 *IJKToRAS);
102 double ia,
double ja,
double ka,
103 double is,
double js,
double ks);
119 virtual void SetSpacing(
double arg1,
double arg2,
double arg3);
122 virtual void SetOrigin(
double arg1,
double arg2,
double arg3);
168 void GetSliceBounds(
double bounds[6], vtkMatrix4x4* rasToSlice,
bool useVoxelCenter =
false);
294 virtual void GetBoundsInternal(
double bounds[6], vtkMatrix4x4* rasToSlice,
bool useTransform,
bool useVoxelCenter =
false);
Abstract class that contains graphical display properties for displayable nodes.
Class to hold information about a node reference.
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.
MRML node for representing a volume display attributes.
virtual void UpdateDisplayNodeImageData(vtkMRMLDisplayNode *dnode)
void ApplyTransform(vtkAbstractTransform *transform) override
vtkMRMLNode * CreateNodeInstance() override=0
MRMLNode methods.
static const char * ComputeScanOrderFromIJKToRAS(vtkMatrix4x4 *IJKToRAS)
void UpdateScene(vtkMRMLScene *scene) override
Finds the storage node and read the data.
void SetIJKToRASDirections(double dirs[3][3])
virtual void SetOrigin(double arg[3])
double GetMinSpacing()
Utility function that returns the min spacing between the 3 orientations.
void GetRASBounds(double bounds[6]) override
virtual vtkMRMLVolumeDisplayNode * GetVolumeDisplayNode()
Associated display MRML node.
void SetIToRASDirection(double ir, double ia, double is)
virtual int GetResamplingInterpolationMode()
@ VoxelVectorTypeUndefined
@ VoxelVectorTypeColorRGBA
@ VoxelVectorTypeColorRGB
vtkMRMLVolumeNode(const vtkMRMLVolumeNode &)
double IJKToRASDirections[3][3]
these are unit length direction cosines
vtkEventForwarderCommand * DataEventForwarder
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
void ProcessMRMLEvents(vtkObject *, unsigned long, void *) override
alternative method to propagate events generated in Display nodes
const char * GetNodeTagName() override=0
Get node XML tag name (like Volume, Model)
void SetIJKToRASMatrix(vtkMatrix4x4 *mat)
virtual void SetImageDataConnection(vtkAlgorithmOutput *inputPort)
void OnNodeReferenceAdded(vtkMRMLNodeReference *reference) override
Called when a node reference ID is added (list size increased).
itk::MetaDataDictionary Dictionary
void ApplyTransformMatrix(vtkMatrix4x4 *transformMatrix) override
static bool IsIJKCoordinateSystemRightHanded(vtkMatrix4x4 *ijkToRasMatrix)
vtkAlgorithmOutput * ImageDataConnection
void SetImageDataToDisplayNodes()
Set the image data pipeline to all the display nodes.
void GetIJKToRASDirectionMatrix(vtkMatrix4x4 *mat)
static void ReverseSliceOrder(vtkImageData *imageData, vtkMatrix4x4 *ijkToRasMatrix)
void GetJToRASDirection(double dirs[3])
virtual void GetBoundsInternal(double bounds[6], vtkMatrix4x4 *rasToSlice, bool useTransform, bool useVoxelCenter=false)
void operator=(const vtkMRMLVolumeNode &)
static const char * GetVoxelVectorTypeAsString(int id)
Convert between voxel type ID and name.
virtual void ApplyNonLinearTransform(vtkAbstractTransform *transform)
void SetRASToIJKMatrix(vtkMatrix4x4 *mat)
void OnNodeReferenceModified(vtkMRMLNodeReference *reference) override
Called when a node reference ID is modified.
static int GetVoxelVectorTypeFromString(const char *name)
void GetIToRASDirection(double dirs[3])
void GetKToRASDirection(double dirs[3])
void SetIJKCoordinateSystemToRightHanded()
void GetBounds(double bounds[6]) override
void GetCenterPositionRAS(double *centerPositionRAS, bool useParentTransform=true)
void SetJToRASDirection(double jr, double ja, double js)
const itk::MetaDataDictionary & GetMetaDataDictionary() const
void SetMetaDataDictionary(const itk::MetaDataDictionary &)
Set/Get the ITK MetaDataDictionary.
void SetKToRASDirection(double kr, double ka, double ks)
void SetIJKToRASDirections(double ir, double jr, double kr, double ia, double ja, double ka, double is, double js, double ks)
virtual double GetImageBackgroundScalarComponentAsDouble(int component)
virtual void SetSpacing(double arg1, double arg2, double arg3)
vtkMRMLCopyContentMacro(vtkMRMLVolumeNode)
void GetRASToIJKMatrix(vtkMatrix4x4 *mat)
void SetIJKToRASDirectionMatrix(vtkMatrix4x4 *mat)
void GetIJKToRASMatrix(vtkMatrix4x4 *mat)
bool AddCenteringTransform()
virtual void SetAndObserveImageData(vtkImageData *ImageData)
double GetMaxSpacing()
Utility function that returns the max spacing between the 3 orientations.
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
virtual vtkImageData * GetImageData()
void PrintSelf(ostream &os, vtkIndent indent) override
void CreateDefaultSequenceDisplayNodes() override
Creates the most appropriate display node class for storing a sequence of these nodes.
double Spacing[3]
these are mappings to mm space
void ShiftImageDataExtentToZeroStart()
void GetSliceBounds(double bounds[6], vtkMatrix4x4 *rasToSlice, bool useVoxelCenter=false)
bool GetModifiedSinceRead() override
~vtkMRMLVolumeNode() override
void CopyOrientation(vtkMRMLVolumeNode *node)
Copy the node's attributes to this object.
bool IsCentered()
Returns true if the volume center is in the origin.
virtual void SetOrigin(double arg1, double arg2, double arg3)
void GetIJKToRASDirections(double dirs[3][3])
bool CanApplyNonLinearTransforms() const override
static bool ComputeIJKToRASFromScanOrder(const char *order, const double *spacing, const int *dims, bool centerImage, vtkMatrix4x4 *IJKToRAS)
RAS->IJK Matrix Calculation.
virtual void SetSpacing(double arg[3])
void SetImageDataToDisplayNode(vtkMRMLVolumeDisplayNode *displayNode)