Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLSliceLayerLogic.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8  Program: 3D Slicer
9  Module: $RCSfile: vtkMRMLSliceLayerLogic.h,v $
10  Date: $Date$
11  Version: $Revision$
12 
13 =========================================================================auto=*/
14 
19 //
27 //
29 //
30 
31 #ifndef __vtkMRMLSliceLayerLogic_h
32 #define __vtkMRMLSliceLayerLogic_h
33 
34 // MRMLLogic includes
35 #include "vtkMRMLAbstractLogic.h"
36 
37 // MRML includes
38 #include "vtkMRMLVolumeNode.h"
39 #include "vtkMRMLSliceNode.h"
44 
45 // VTK includes
46 #include <vtkImageLogic.h>
47 #include <vtkImageExtractComponents.h>
48 #include <vtkVersion.h>
49 
50 class vtkAssignAttribute;
51 class vtkImageReslice;
52 class vtkGeneralTransform;
53 
54 // STL includes
55 //#include <cstdlib>
56 
58 class vtkTransform;
59 
60 class VTK_MRML_LOGIC_EXPORT vtkMRMLSliceLayerLogic
61  : public vtkMRMLAbstractLogic
62 {
63 public:
64 
66  static vtkMRMLSliceLayerLogic *New();
68  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
69 
72  vtkGetObjectMacro (VolumeNode, vtkMRMLVolumeNode);
73  void SetVolumeNode (vtkMRMLVolumeNode *VolumeNode);
74 
79  vtkGetObjectMacro (VolumeDisplayNode, vtkMRMLVolumeDisplayNode);
80  vtkGetObjectMacro (VolumeDisplayNodeUVW, vtkMRMLVolumeDisplayNode);
81 
84  vtkGetObjectMacro (SliceNode, vtkMRMLSliceNode);
85  void SetSliceNode (vtkMRMLSliceNode *SliceNode);
86 
89  vtkGetObjectMacro (Reslice, vtkImageReslice);
90  vtkGetObjectMacro (ResliceUVW, vtkImageReslice);
91 
95  vtkGetMacro (IsLabelLayer, int);
96  vtkSetMacro (IsLabelLayer, int);
97  vtkBooleanMacro (IsLabelLayer, int);
98 
101  vtkGetObjectMacro (LabelOutline, vtkImageLabelOutline);
102 
105  vtkImageData *GetImageData();
106  vtkAlgorithmOutput *GetImageDataConnection();
107 
110  vtkImageData *GetImageDataUVW();
111  vtkAlgorithmOutput *GetImageDataConnectionUVW();
112 
113  void UpdateImageDisplay();
114 
118  void UpdateTransforms();
119 
120  void UpdateGlyphs();
121 
122 
126  void UpdateNodeReferences();
127 
130  vtkGetObjectMacro (XYToIJKTransform, vtkGeneralTransform);
131 
132 
133 protected:
135  virtual ~vtkMRMLSliceLayerLogic();
137  void operator=(const vtkMRMLSliceLayerLogic&);
138 
139  // Initialize listening to MRML events
140  virtual void SetMRMLSceneInternal(vtkMRMLScene * newScene) VTK_OVERRIDE;
141 
145  virtual void ProcessMRMLSceneEvents(vtkObject* caller,
146  unsigned long event,
147  void* callData) VTK_OVERRIDE;
148  virtual void ProcessMRMLNodesEvents(vtkObject* caller,
149  unsigned long event,
150  void* callData) VTK_OVERRIDE;
151  void UpdateLogic();
152  virtual void OnMRMLNodeModified(vtkMRMLNode* node) VTK_OVERRIDE;
153  vtkAlgorithmOutput* GetSliceImageDataConnection();
154  vtkAlgorithmOutput* GetSliceImageDataConnectionUVW();
155 
156  // Copy VolumeDisplayNodeObserved into VolumeDisplayNode
157  void UpdateVolumeDisplayNode();
158 
166 
169  vtkImageReslice *Reslice;
170  vtkImageReslice *ResliceUVW;
173 
174  vtkAssignAttribute* AssignAttributeTensorsToScalars;
175  vtkAssignAttribute* AssignAttributeScalarsToTensors;
177 
179  vtkGeneralTransform *XYToIJKTransform;
180  vtkGeneralTransform *UVWToIJKTransform;
181 
183 
185 };
186 
187 #endif
188 
vtkImageLabelOutline * LabelOutlineUVW
vtkGeneralTransform * UVWToIJKTransform
Superclass for MRML logic classes.
vtkAssignAttribute * AssignAttributeScalarsToTensorsUVW
MRML node for representing a volume display attributes.
MRML node for storing a slice through RAS space.
vtkGeneralTransform * XYToIJKTransform
TODO: make this a vtkAbstractTransform for non-linear.
vtkAssignAttribute * AssignAttributeTensorsToScalars
Display labelmap outlines.
virtual void ProcessMRMLNodesEvents(vtkObject *caller, unsigned long event, void *callData)
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual void OnMRMLNodeModified(vtkMRMLNode *)
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
vtkAssignAttribute * AssignAttributeScalarsToTensors
vtkImageReslice * Reslice
the VTK class instances that implement this Logic&#39;s operations
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene)
virtual void ProcessMRMLSceneEvents(vtkObject *caller, unsigned long event, void *callData)
vtkMRMLVolumeNode * VolumeNode
the MRML Nodes that define this Logic&#39;s parameters
MRML node for representing a volume (image stack).
vtkMRMLVolumeDisplayNode * VolumeDisplayNodeUVW
vtkMRMLVolumeDisplayNode * VolumeDisplayNode
vtkMRMLVolumeDisplayNode * VolumeDisplayNodeObserved
vtkImageLabelOutline * LabelOutline
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138
static vtkMRMLAbstractLogic * New()