15 #ifndef __vtkMRMLSliceNode_h    16 #define __vtkMRMLSliceNode_h    43   void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
    49   virtual 
void ReadXMLAttributes( const 
char** atts) VTK_OVERRIDE;
    53   virtual 
void WriteXML(ostream& of, 
int indent) VTK_OVERRIDE;
    62   virtual 
void Reset(
vtkMRMLNode* defaultNode) VTK_OVERRIDE;
    66   virtual const 
char* GetNodeTagName() VTK_OVERRIDE {
return "Slice";};
    73   virtual vtkMatrix4x4 *GetSliceToRAS();
    77   vtkGetMacro ( SliceVisible, 
int );
    78   vtkSetMacro ( SliceVisible, 
int );
    82   vtkGetMacro ( WidgetVisible, 
int );
    83   vtkSetMacro ( WidgetVisible, 
int );
    87   void AddThreeDViewID(
const char* viewNodeID);
    90   void RemoveThreeDViewID(
char* viewNodeID);
    93   void RemoveAllThreeDViewIDs();
    97   int GetNumberOfThreeDViewIDs()
const;
   101   const char* GetNthThreeDViewID(
unsigned int index);
   105   inline std::vector< std::string > GetThreeDViewIDs()
const;
   109   bool IsThreeDViewIDPresent(
const char* ThreeDViewID)
const;
   114   bool IsDisplayableInThreeDView(
const char* viewNodeID)
const;
   118   vtkGetMacro ( WidgetNormalLockedToCamera, 
int );
   119   vtkSetMacro ( WidgetNormalLockedToCamera, 
int );
   123   vtkGetMacro ( UseLabelOutline, 
int );
   124   vtkSetMacro ( UseLabelOutline, 
int );
   125   vtkBooleanMacro ( UseLabelOutline, 
int );
   133   bool SetOrientationToAxial();
   134   bool SetOrientationToSagittal();
   135   bool SetOrientationToCoronal();
   143   std::string GetOrientation();
   146   std::string GetOrientation(vtkMatrix4x4* sliceToRAS);
   158   bool SetOrientation(
const char* orientation);
   163   virtual const char* GetOrientationString();
   174   vtkGetStringMacro (OrientationReference);
   175   vtkSetStringMacro (OrientationReference);
   180   vtkMatrix3x3 *GetSliceOrientationPreset(
const std::string& name);
   186   std::string GetSliceOrientationPresetName(vtkMatrix3x3* orientationMatrix);
   189   void GetSliceOrientationPresetNames(vtkStringArray* presetOrientationNames);
   193   int GetNumberOfSliceOrientationPresets() 
const;
   199   bool AddSliceOrientationPreset(
const std::string& name, vtkMatrix3x3* orientationMatrix);
   204   bool RemoveSliceOrientationPreset(
const std::string& name);
   209   bool RenameSliceOrientationPreset(
const std::string& name, 
const std::string& updatedName);
   214   bool HasSliceOrientationPreset(
const std::string& name);
   217   static void InitializeAxialMatrix(vtkMatrix3x3* orientationMatrix);
   220   static void InitializeSagittalMatrix(vtkMatrix3x3* orientationMatrix);
   223   static void InitializeCoronalMatrix(vtkMatrix3x3* orientationMatrix);
   231   static void AddDefaultSliceOrientationPresets(
vtkMRMLScene* scene);
   235   vtkGetVector3Macro (FieldOfView, 
double);
   236   void SetFieldOfView (
double x, 
double y, 
double z);
   240   vtkGetVector3Macro (XYZOrigin, 
double);
   241   void SetXYZOrigin (
double x, 
double y, 
double z);
   246   vtkGetVectorMacro(Dimensions,
int,3)
   247   void SetDimensions (
int x, 
int y, 
int z);
   256   vtkGetVectorMacro(UVWDimensions,
int,3)
   257   void SetUVWDimensions (
int x, 
int y, 
int z);
   258   void SetUVWDimensions (
int xyz[3]);
   262   vtkGetVectorMacro(UVWMaximumDimensions,
int,3)
   263   void SetUVWMaximumDimensions (
int x, 
int y, 
int z);
   264   void SetUVWMaximumDimensions (
int xyz[3]);
   268   vtkGetVector3Macro (UVWExtents, 
double);
   269   void SetUVWExtents (
double x, 
double y, 
double z);
   270   void SetUVWExtents (
double xyz[3]);
   274   vtkGetVector3Macro (UVWOrigin, 
double);
   275   void SetUVWOrigin (
double x, 
double y, 
double z);
   276   void SetUVWOrigin (
double xyz[3]);
   280   void SetSliceOrigin (
double xyz[3]);
   281   void SetSliceOrigin (
double x, 
double y, 
double z);
   286   void SetUVWExtentsAndDimensions (
double extents[3], 
int dimensions[3]);
   292   vtkMatrix4x4 *GetXYToSlice();
   297   vtkMatrix4x4 *GetXYToRAS();
   302   vtkMatrix4x4 *GetUVWToSlice();
   307   vtkMatrix4x4 *GetUVWToRAS();
   311   bool MatrixAreEqual(
const vtkMatrix4x4 *m1, 
const vtkMatrix4x4 *m2);
   313   bool MatrixAreEqual(
const vtkMatrix4x4 *matrix,
   314                       const vtkMatrix3x3 *orientationMatrix);
   318   void UpdateMatrices();
   321   vtkSetVector3Macro(LayoutColor, 
double);
   322   vtkGetVector3Macro(LayoutColor, 
double);
   324   static double* redColor();
   325   static double* yellowColor();
   326   static double* greenColor();
   327   static double* compareColor();
   328   static double* grayColor();
   333   void SetLayoutGrid( 
int rows, 
int columns );
   337   vtkGetMacro (LayoutGridRows, 
int);
   338   virtual void SetLayoutGridRows(
int rows);
   342   vtkGetMacro (LayoutGridColumns, 
int);
   343   virtual void SetLayoutGridColumns(
int cols);
   351   void SetSliceToRASByNTP (
double Nx, 
double Ny, 
double Nz,
   352                            double Tx, 
double Ty, 
double Tz,
   353                            double Px, 
double Py, 
double Pz,
   359   void JumpSlice(
double r, 
double a, 
double s);
   360   void JumpAllSlices(
double r, 
double a, 
double s);
   367   static void JumpAllSlices(
vtkMRMLScene* scene, 
double r, 
double a, 
double s,
   369   void JumpSliceByOffsetting(
double r, 
double a, 
double s);
   370   void JumpSliceByOffsetting(
int k, 
double r, 
double a, 
double s);
   371   void JumpSliceByCentering(
double r, 
double a, 
double s);
   374   enum {DefaultJumpSlice=-1, CenteredJumpSlice=0, OffsetJumpSlice};
   381   vtkSetMacro(JumpMode, 
int);
   382   vtkGetMacro(JumpMode, 
int);
   383   void SetJumpModeToCentered();
   384   void SetJumpModeToOffset();
   388   enum {AutomaticSliceSpacingMode=0, PrescribedSliceSpacingMode};
   393   vtkGetMacro(SliceSpacingMode, 
int);
   394   vtkSetMacro(SliceSpacingMode, 
int);
   395   void SetSliceSpacingModeToAutomatic();
   396   void SetSliceSpacingModeToPrescribed();
   401   vtkSetVector3Macro(PrescribedSliceSpacing, 
double);
   402   vtkGetVector3Macro(PrescribedSliceSpacing, 
double);
   406   double GetSliceOffset();
   407   void SetSliceOffset(
double offset);
   411   vtkSetMacro(ActiveSlice, 
int);
   412   vtkGetMacro(ActiveSlice, 
int);
   425   void SetInteracting(
int);
   426   vtkGetMacro(Interacting, 
int);
   427   vtkBooleanMacro(Interacting, 
int);
   448     ResetFieldOfViewFlag = 8, 
   449     MultiplanarReformatFlag = 16, 
   451     LabelOutlineFlag = 64,
   452     SliceVisibleFlag = 128,
   453     SliceSpacingFlag = 256
   462   void SetInteractionFlags(
unsigned int);
   463   vtkGetMacro(InteractionFlags, 
unsigned int);
   470   void SetInteractionFlagsModifier(
unsigned int);
   471   vtkGetMacro(InteractionFlagsModifier, 
unsigned int);
   476   void ResetInteractionFlagsModifier();
   484     SliceResolutionMatchVolumes=0,
   488     SliceResolutionCustom
   493   virtual void SetSliceResolutionMode(
int mode);
   494   vtkGetMacro(SliceResolutionMode, 
int);
   522   double FieldOfView[3];
   528   double UVWExtents[3];
   529   int UVWDimensions[3];
   530   int UVWMaximumDimensions[3];
   537   double LayoutColor[3];
   543   double PrescribedSliceSpacing[3];
   559   return this->ThreeDViewIDs;
 
unsigned int InteractionFlagsModifier
 
char * OrientationReference
 
std::vector< std::string > ThreeDViewIDs
 
unsigned int InteractionFlags
 
MRML node for storing a slice through RAS space. 
 
vtkSmartPointer< vtkMatrix4x4 > UVWToRAS
 
vtkSmartPointer< vtkMatrix4x4 > XYToRAS
 
void operator=(const vtkMRMLAbstractViewNode &)
 
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual. 
 
vtkSmartPointer< vtkMatrix4x4 > SliceToRAS
 
std::vector< std::string > GetThreeDViewIDs() const
 
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D...
 
A set of MRML Nodes that supports serialization and undo/redo. 
 
std::vector< OrientationPresetType > OrientationMatrices
 
MRML node for representing a volume (image stack). 
 
vtkSmartPointer< vtkMatrix4x4 > XYToSlice
 
SliceResolutionModeType
Enum to specify the method for setting UVW extents. 
 
Abstract Superclass for all specific types of MRML nodes. 
 
vtkSmartPointer< vtkMatrix4x4 > UVWToSlice
 
std::pair< std::string, vtkSmartPointer< vtkMatrix3x3 > > OrientationPresetType
 
int WidgetNormalLockedToCamera
 
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
 
std::string OrientationString