15 #ifndef __vtkMRMLSliceLogic_h 16 #define __vtkMRMLSliceLogic_h 34 class vtkAlgorithmOutput;
39 class vtkImageReslice;
42 struct SliceLayerInfo;
63 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
71 vtkSetStringMacro(Name);
72 vtkGetStringMacro(Name);
104 void SetBackgroundWindowLevel(
double window,
double level);
108 void GetBackgroundWindowLevelAndRange(
double& window,
double& level,
109 double& rangeLow,
double& rangeHigh);
113 void SetForegroundWindowLevel(
double window,
double level);
117 void GetForegroundWindowLevelAndRange(
double& window,
double& level,
118 double& rangeLow,
double& rangeHigh);
134 vtkImageBlend* GetBlend();
135 vtkImageBlend* GetBlendUVW();
140 vtkGetObjectMacro(ExtractModelTexture, vtkImageReslice);
145 vtkAlgorithmOutput *GetImageDataConnection();
149 void UpdatePipeline();
152 void UpdateImageData();
156 virtual bool EnterMRMLCallback()
const;
160 void UpdateSliceNode();
164 void UpdateSliceNodeFromLayout();
168 void UpdateSliceCompositeNode();
177 static void GetVolumeRASBox(
vtkMRMLVolumeNode *volumeNode,
double rasDimensions[3],
double rasCenter[3]);
181 void GetVolumeSliceDimensions(
vtkMRMLVolumeNode *volumeNode,
double sliceDimensions[3],
double sliceCenter[3]);
201 void GetBackgroundRASBox(
double rasDimensions[3],
double rasCenter[3]);
205 void GetBackgroundSliceDimensions(
double sliceDimensions[3],
double sliceCenter[3]);
211 double *GetBackgroundSliceSpacing();
217 void GetBackgroundSliceBounds(
double sliceBounds[6]);
221 void FitSliceToBackground(
int width,
int height);
226 void FitSliceToAll(
int width = -1,
int height = -1);
230 void FitFOVToBackground(
double fov);
237 void ResizeSliceNode(
double newWidth,
double newHeight);
244 double *GetLowestVolumeSliceSpacing();
251 void GetLowestVolumeSliceBounds(
double sliceBounds[6]);
255 double GetSliceOffset();
256 void SetSliceOffset(
double offset);
260 void GetSliceBounds(
double sliceBounds[6]);
264 void SetSliceExtentsToSliceNode();
269 void StartSliceNodeInteraction(
unsigned int parameters);
272 void EndSliceNodeInteraction();
277 void StartSliceCompositeNodeInteraction(
unsigned int parameters);
280 void EndSliceCompositeNodeInteraction();
283 void StartSliceOffsetInteraction();
286 void EndSliceOffsetInteraction();
291 void SnapSliceOffsetToIJK();
312 int GetSliceIndexFromOffset(
double sliceOffset);
316 void CreateSliceModel();
317 void DeleteSliceModel();
321 std::vector< vtkMRMLDisplayNode*> GetPolyDataDisplayNodes();
335 static bool IsSliceModelNode(
vtkMRMLNode *mrmlNode);
353 void * callData) VTK_OVERRIDE;
359 virtual
void OnMRMLSceneStartClose() VTK_OVERRIDE;
360 virtual
void OnMRMLSceneEndImport() VTK_OVERRIDE;
361 virtual
void OnMRMLSceneEndRestore() VTK_OVERRIDE;
363 void UpdateSliceNodes();
364 void SetupCrosshairNode();
366 virtual
void OnMRMLNodeModified(
vtkMRMLNode* node) VTK_OVERRIDE;
368 const
char* layoutName);
370 const
char* layoutName);
374 void SetWindowLevel(
double window,
double level,
int layer);
380 bool UpdateBlendLayers(vtkImageBlend* blend, const
std::deque<SliceLayerInfo> &layers);
382 bool AddingSliceModelNodes;
392 BlendPipeline* Pipeline;
393 BlendPipeline* PipelineUVW;
394 vtkImageReslice * ExtractModelTexture;
395 vtkAlgorithmOutput * ImageDataConnection;
396 vtkTransform * ActiveSliceTransform;
401 double SliceSpacing[3];
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.