15#ifndef __vtkMRMLSliceNode_h
16#define __vtkMRMLSliceNode_h
23class vtkImplicitFunction;
45 void PrintSelf(ostream& os, vtkIndent indent)
override;
55 void WriteXML(ostream& of,
int indent)
override;
349 const vtkMatrix3x3 *orientationMatrix);
377 double Tx,
double Ty,
double Tz,
378 double Px,
double Py,
double Pz,
455 void RotateToAxes(vtkMatrix4x4 *referenceToRAS,
int sliceNormalAxisIndex=-1);
vtkMRMLAbstractViewNode()
friend class vtkMRMLScene
void ResetInteractionFlagsModifier()
bool IsDisplayableInThreeDView(const char *viewNodeID) const
void ReadXMLAttributes(const char **atts) override
Set node attributes.
void SetXYZOrigin(double xyz[3])
int WidgetNormalLockedToCamera
void SetSliceToRASByNTP(double Nx, double Ny, double Nz, double Tx, double Ty, double Tz, double Px, double Py, double Pz, int Orientation)
void SetSliceOffset(double offset)
virtual const char * GetOrientationString()
Get orientation.
void SetInteractionFlags(unsigned int)
bool SetOrientationToSagittal()
void JumpSlice(double r, double a, double s)
void RotateToAxes(vtkMatrix4x4 *referenceToRAS, int sliceNormalAxisIndex=-1)
@ MultiplanarReformatFlag
@ UpdateSlabReconstructionThicknessFlag
@ SliceEdgeVisibility3DFlag
@ RotateToBackgroundVolumePlaneFlag
const char * GetNthThreeDViewID(unsigned int index)
bool RemoveSliceOrientationPreset(const std::string &name)
Remove an orientation preset.
void SetJumpModeToOffset()
void SetUVWExtentsAndDimensions(double extents[3], int dimensions[3])
unsigned int InteractionFlagsModifier
vtkMatrix4x4 * GetXYToSlice()
vtkMatrix4x4 * GetUVWToSlice()
double PrescribedSliceSpacing[3]
static void GetSagittalSliceToRASMatrix(vtkMatrix3x3 *orientationMatrix, bool patientRightIsScreenLeft=true)
Initialize orientationMatrix as a Sagittal orientation matrix.
bool MatrixAreEqual(const vtkMatrix4x4 *m1, const vtkMatrix4x4 *m2)
helper for comparing to matrices
static void GetCoronalSliceToRASMatrix(vtkMatrix3x3 *orientationMatrix, bool patientRightIsScreenLeft=true)
Initialize orientationMatrix as a Coronal orientation matrix.
void SetDimensions(int xyz[3])
void SetSliceSpacingModeToPrescribed()
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
void RemoveAllThreeDViewIDs()
void JumpSliceByOffsetting(double r, double a, double s)
void SetFieldOfView(double x, double y, double z)
static const char * GetReformatOrientationName()
void RotateToVolumePlane(vtkMRMLVolumeNode *volumeNode, bool forceSlicePlaneToSingleSlice=true)
virtual void SetSliceResolutionMode(int mode)
method for setting UVW space (extents, dimensions and spacing)
static void AddDefaultSliceOrientationPresets(vtkMRMLScene *scene, bool patientRightIsScreenLeft=true)
Add default slice orientation presets to scene.
vtkMatrix4x4 * GetUVWToRAS()
vtkSmartPointer< vtkMatrix4x4 > SliceToRAS
int SlabReconstructionType
void SetUVWOrigin(double x, double y, double z)
void JumpSliceByCentering(double r, double a, double s)
vtkMRMLSliceNode(const vtkMRMLSliceNode &)
std::vector< OrientationPresetType > OrientationMatrices
std::string GetOrientation(vtkMatrix4x4 *sliceToRAS)
Return the orientation name associated with sliceToRAS.
bool RenameSliceOrientationPreset(const std::string &name, const std::string &updatedName)
Rename an orientation preset.
virtual vtkImplicitFunction * GetImplicitFunctionWorld()
bool AddSliceOrientationPreset(const std::string &name, vtkMatrix3x3 *orientationMatrix)
Add or update an orientation preset.
void PrintSelf(ostream &os, vtkIndent indent) override
static int GetSlabReconstructionTypeFromString(const char *name)
static const char * GetSlabReconstructionTypeAsString(int slabReconstructionType)
bool SetOrientation(const char *orientation)
Set orientation.
char * OrientationReference
bool SetOrientationToAxial()
Set 'standard' radiological convention views of patient space.
void SetUVWExtents(double xyz[3])
bool SetOrientationToCoronal()
void Reset(vtkMRMLNode *defaultNode) override
Reimplemented to preserve orientation and layout color when reset.
unsigned int InteractionFlags
SliceResolutionModeType
Enum to specify the method for setting UVW extents.
@ SliceResolutionMatch2DView
@ SliceFOVMatch2DViewSpacingMatchVolumes
@ SliceFOVMatchVolumesSpacingMatch2DView
@ SliceResolutionMatchVolumes
bool IsThreeDViewIDPresent(const char *ThreeDViewID) const
bool MatrixAreEqual(const vtkMatrix4x4 *matrix, const vtkMatrix3x3 *orientationMatrix)
void RemoveThreeDViewID(char *viewNodeID)
void JumpAllSlices(double r, double a, double s)
void SetUVWDimensions(int xyz[3])
void operator=(const vtkMRMLSliceNode &)
void SetUVWMaximumDimensions(int x, int y, int z)
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
void GetSliceOrientationPresetNames(vtkStringArray *presetOrientationNames)
Return all the orientation preset names.
bool SetOrientationToDefault()
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
int UVWMaximumDimensions[3]
std::string GetSliceOrientationPresetName(vtkMatrix3x3 *orientationMatrix)
Return the preset name corresponding to orientationMatrix.
vtkMatrix3x3 * GetSliceOrientationPreset(const std::string &name)
Return the sliceToRAS matrix associated with name.
std::pair< std::string, vtkSmartPointer< vtkMatrix3x3 > > OrientationPresetType
vtkMRMLCopyContentMacro(vtkMRMLSliceNode)
bool SliceEdgeVisibility3D
double GetSliceOffset()
Get/Set the current distance from the origin to the slice plane.
void AddThreeDViewID(const char *viewNodeID)
@ PrescribedSliceSpacingMode
@ AutomaticSliceSpacingMode
int GetNumberOfThreeDViewIDs() const
vtkSmartPointer< vtkPlane > ImplicitFunction
double SlabReconstructionOversamplingFactor
virtual void SetLayoutGridColumns(int cols)
void SetSliceSpacingModeToAutomatic()
bool HasSliceOrientationPreset(const std::string &name)
Return True if an orientation preset is stored.
char * DefaultOrientation
std::string OrientationString
void JumpSliceByOffsetting(int k, double r, double a, double s)
void SetUVWMaximumDimensions(int xyz[3])
static void JumpAllSlices(vtkMRMLScene *scene, double r, double a, double s, int jumpMode=vtkMRMLSliceNode::DefaultJumpSlice, int viewGroup=-1, vtkMRMLSliceNode *exclude=nullptr)
std::vector< std::string > GetThreeDViewIDs() const
std::string GetOrientation()
Get orientation.
void SetInteractionFlagsModifier(unsigned int)
void SetFieldOfView(double xyz[3])
double SlabReconstructionThickness
static void GetAxialSliceToRASMatrix(vtkMatrix3x3 *orientationMatrix, bool patientRightIsScreenLeft=true)
Initialize orientationMatrix as an Axial orientation matrix.
std::vector< std::string > ThreeDViewIDs
vtkSmartPointer< vtkMatrix4x4 > UVWToRAS
void SetSliceOrigin(double x, double y, double z)
virtual vtkMatrix4x4 * GetSliceToRAS()
~vtkMRMLSliceNode() override
vtkSmartPointer< vtkMatrix4x4 > UVWToSlice
virtual void SetLayoutGridRows(int rows)
void SetJumpModeToCentered()
void SetDimensions(int x, int y, int z)
int GetNumberOfSliceOrientationPresets() const
Return number of orientation presets.
vtkSmartPointer< vtkMatrix4x4 > XYToSlice
void SetUVWDimensions(int x, int y, int z)
vtkSmartPointer< vtkMatrix4x4 > XYToRAS
void SetXYZOrigin(double x, double y, double z)
bool SlabReconstructionEnabled
vtkMatrix4x4 * GetXYToRAS()
static vtkMRMLSliceNode * New()
Instantiate a new Slice node without any orientation presets.
void SetSliceOrigin(double xyz[3])
Origin of slice in XYZ or UVW space depending on SliceResolutionMode.
void SetUVWExtents(double x, double y, double z)
void SetLayoutGrid(int rows, int columns)
void SetUVWOrigin(double xyz[3])
MRML node for representing a volume (image stack).