15 #ifndef __vtkMRMLSliceLogic_h 16 #define __vtkMRMLSliceLogic_h 33 class vtkAlgorithmOutput;
38 class vtkImageReslice;
39 class vtkPolyDataCollection;
60 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
68 vtkSetStringMacro(Name);
69 vtkGetStringMacro(Name);
101 void SetBackgroundWindowLevel(
double window,
double level);
105 void GetBackgroundWindowLevelAndRange(
double& window,
double& level,
106 double& rangeLow,
double& rangeHigh);
110 void SetForegroundWindowLevel(
double window,
double level);
114 void GetForegroundWindowLevelAndRange(
double& window,
double& level,
115 double& rangeLow,
double& rangeHigh);
131 vtkGetObjectMacro(Blend, vtkImageBlend);
132 vtkGetObjectMacro(BlendUVW, vtkImageBlend);
136 vtkGetObjectMacro(ActiveSliceTransform, vtkTransform);
140 vtkGetObjectMacro(PolyDataCollection, vtkPolyDataCollection);
144 vtkGetObjectMacro(LookupTableCollection, vtkCollection);
149 vtkGetObjectMacro(ExtractModelTexture, vtkImageReslice);
154 vtkAlgorithmOutput *GetImageDataConnection();
158 void UpdatePipeline();
161 void UpdateImageData();
165 virtual bool EnterMRMLCallback()
const;
169 void UpdateSliceNode();
173 void UpdateSliceNodeFromLayout();
177 void UpdateSliceCompositeNode();
186 static void GetVolumeRASBox(
vtkMRMLVolumeNode *volumeNode,
double rasDimensions[3],
double rasCenter[3]);
190 void GetVolumeSliceDimensions(
vtkMRMLVolumeNode *volumeNode,
double sliceDimensions[3],
double sliceCenter[3]);
210 void GetBackgroundRASBox(
double rasDimensions[3],
double rasCenter[3]);
214 void GetBackgroundSliceDimensions(
double sliceDimensions[3],
double sliceCenter[3]);
220 double *GetBackgroundSliceSpacing();
226 void GetBackgroundSliceBounds(
double sliceBounds[6]);
230 void FitSliceToBackground(
int width,
int height);
235 void FitSliceToAll(
int width = -1,
int height = -1);
239 void FitFOVToBackground(
double fov);
246 void ResizeSliceNode(
double newWidth,
double newHeight);
253 double *GetLowestVolumeSliceSpacing();
260 void GetLowestVolumeSliceBounds(
double sliceBounds[6]);
264 double GetSliceOffset();
265 void SetSliceOffset(
double offset);
269 void GetSliceBounds(
double sliceBounds[6]);
273 void SetSliceExtentsToSliceNode();
278 void StartSliceNodeInteraction(
unsigned int parameters);
281 void EndSliceNodeInteraction();
286 void StartSliceCompositeNodeInteraction(
unsigned int parameters);
289 void EndSliceCompositeNodeInteraction();
292 void StartSliceOffsetInteraction();
295 void EndSliceOffsetInteraction();
300 void SnapSliceOffsetToIJK();
321 int GetSliceIndexFromOffset(
double sliceOffset);
325 void CreateSliceModel();
326 void DeleteSliceModel();
330 std::vector< vtkMRMLDisplayNode*> GetPolyDataDisplayNodes();
344 static bool IsSliceModelNode(
vtkMRMLNode *mrmlNode);
362 void * callData) VTK_OVERRIDE;
368 virtual
void OnMRMLSceneStartClose() VTK_OVERRIDE;
369 virtual
void OnMRMLSceneEndImport() VTK_OVERRIDE;
370 virtual
void OnMRMLSceneEndRestore() VTK_OVERRIDE;
372 void UpdateSliceNodes();
373 void SetupCrosshairNode();
375 virtual
void OnMRMLNodeModified(
vtkMRMLNode* node) VTK_OVERRIDE;
377 const
char* layoutName);
379 const
char* layoutName);
383 void SetWindowLevel(
double window,
double level,
int layer);
385 bool AddingSliceModelNodes;
396 vtkImageBlend * Blend;
397 vtkImageBlend * BlendUVW;
398 vtkImageReslice * ExtractModelTexture;
399 vtkAlgorithmOutput * ImageDataConnection;
400 vtkTransform * ActiveSliceTransform;
402 vtkPolyDataCollection * PolyDataCollection;
403 vtkCollection * LookupTableCollection;
408 double SliceSpacing[3];
413 void operator=(const vtkMRMLSliceLogic&);
static const int SLICE_INDEX_ROTATED
Superclass for MRML logic classes.
static const int SLICE_INDEX_OUT_OF_VOLUME
MRML node to represent a display property of 3D surface model.
MRML node to represent a 3D surface model.
static const int SLICE_INDEX_NO_VOLUME
MRML node for storing a slice through RAS space.
MRML node for storing a slice through RAS space.
virtual void ProcessMRMLLogicsEvents(vtkObject *caller, unsigned long event, void *callData)
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
A set of MRML Nodes that supports serialization and undo/redo.
virtual void OnMRMLSceneNodeAdded(vtkMRMLNode *)
static const std::string SLICE_MODEL_NODE_NAME_SUFFIX
virtual void OnMRMLSceneNodeRemoved(vtkMRMLNode *)
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene)
MRML node for representing a volume (image stack).
Abstract class that contains graphical display properties for displayable nodes.
virtual void UpdateFromMRMLScene()
Abstract Superclass for all specific types of MRML nodes.
static vtkMRMLAbstractLogic * New()
Slicer logic class for slice manipulation.