Slicer  4.11
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) 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 
135  vtkGetMacro(InterpolationMode, int);
136  vtkSetMacro(InterpolationMode, int);
137 
138 protected:
140  ~vtkMRMLSliceLayerLogic() override;
142  void operator=(const vtkMRMLSliceLayerLogic&);
143 
144  // Initialize listening to MRML events
145  void SetMRMLSceneInternal(vtkMRMLScene * newScene) override;
146 
150  void ProcessMRMLSceneEvents(vtkObject* caller,
151  unsigned long event,
152  void* callData) override;
153  void ProcessMRMLNodesEvents(vtkObject* caller,
154  unsigned long event,
155  void* callData) override;
156  void UpdateLogic();
157  void OnMRMLNodeModified(vtkMRMLNode* node) override;
158  vtkAlgorithmOutput* GetSliceImageDataConnection();
159  vtkAlgorithmOutput* GetSliceImageDataConnectionUVW();
160 
161  // Copy VolumeDisplayNodeObserved into VolumeDisplayNode
162  void UpdateVolumeDisplayNode();
163 
171 
174  vtkImageReslice *Reslice;
175  vtkImageReslice *ResliceUVW;
178 
179  vtkAssignAttribute* AssignAttributeTensorsToScalars;
180  vtkAssignAttribute* AssignAttributeScalarsToTensors;
182 
184  vtkGeneralTransform *XYToIJKTransform;
185  vtkGeneralTransform *UVWToIJKTransform;
186 
188 
190 
192 };
193 
194 #endif
195 
vtkImageLabelOutline * LabelOutlineUVW
vtkGeneralTransform * UVWToIJKTransform
Superclass for MRML logic classes.
vtkAssignAttribute * AssignAttributeScalarsToTensorsUVW
void PrintSelf(ostream &os, vtkIndent indent) override
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)
virtual void OnMRMLNodeModified(vtkMRMLNode *)
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:61
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:167
static vtkMRMLAbstractLogic * New()