Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkSlicerCropVolumeLogic.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: vtkSlicerCropVolumeLogic.h,v $
10 Date: $Date: 2006/01/08 04:48:05 $
11 Version: $Revision: 1.45 $
12
13=========================================================================auto=*/
14
15// .NAME vtkSlicerCropVolumeLogic - slicer logic class for volumes manipulation
16// .SECTION Description
17// This class manages the logic associated with reading, saving,
18// and changing propertied of the volumes
19
20#ifndef __vtkSlicerCropVolumeLogic_h
21#define __vtkSlicerCropVolumeLogic_h
22
23// Slicer includes
28
29// VTK includes
30class vtkMatrix4x4;
31
32// CropVolumes includes
33#include "vtkSlicerCropVolumeModuleLogicExport.h"
35
63class VTK_SLICER_CROPVOLUME_MODULE_LOGIC_EXPORT vtkSlicerCropVolumeLogic : public vtkSlicerModuleLogic
64{
65public:
68 void PrintSelf(ostream& os, vtkIndent indent) override;
69
72
75 static int CropVoxelBased(vtkMRMLDisplayableNode* roi, vtkMRMLVolumeNode* inputVolume, vtkMRMLVolumeNode* outputNode, bool limitToInputExtent = true, double fillValue = 0.0);
76
79 static bool GetVoxelBasedCropOutputExtent(vtkMRMLDisplayableNode* roi, vtkMRMLVolumeNode* inputVolume, int outputExtent[6], bool limitToInputExtent = false);
80
83 vtkMRMLVolumeNode* inputVolume,
84 vtkMRMLVolumeNode* outputNode,
85 bool isotropicResampling,
86 double spacingScale,
87 int interpolationMode,
88 double fillValue);
89
92 vtkMRMLVolumeNode* inputVolume,
93 bool isotropicResampling,
94 double spacingScale,
95 int outputExtent[6],
96 double outputSpacing[3]);
97
99 static bool FitROI(vtkMRMLCropVolumeParametersNode* parametersNode);
100
104
107
110
111 void RegisterNodes() override;
112
114 bool ReorientVolumeEnd(vtkMRMLCropVolumeParametersNode* parametersNode, bool apply);
116
117protected:
120
121private:
123 void operator=(const vtkSlicerCropVolumeLogic&) = delete;
124
125 class vtkInternal;
126 vtkInternal* Internal;
127};
128
129#endif
MRML node for representing a transformation between this node space and a parent node space.
MRML node for representing a volume (image stack).
static bool FitROI(vtkMRMLCropVolumeParametersNode *parametersNode)
Sets ROI to fit to input volume. Orientation of the ROI set based on FitROIMode setting.
static void SnapROIToVoxelGrid(vtkMRMLCropVolumeParametersNode *parametersNode)
bool ReorientVolumeEnd(vtkMRMLCropVolumeParametersNode *parametersNode, bool apply)
static vtkSlicerCropVolumeLogic * New()
int Apply(vtkMRMLCropVolumeParametersNode *)
Crop input volume using the specified ROI node.
~vtkSlicerCropVolumeLogic() override
vtkMRMLTransformNode * GetReorientTransformNode(vtkMRMLCropVolumeParametersNode *parametersNode)
static bool GetInterpolatedCropOutputGeometry(vtkMRMLDisplayableNode *roi, vtkMRMLVolumeNode *inputVolume, bool isotropicResampling, double spacingScale, int outputExtent[6], double outputSpacing[3])
Computes output volume geometry for interpolated cropping (without actually cropping the image).
static bool GetVoxelBasedCropOutputExtent(vtkMRMLDisplayableNode *roi, vtkMRMLVolumeNode *inputVolume, int outputExtent[6], bool limitToInputExtent=false)
void RegisterNodes() override
void PrintSelf(ostream &os, vtkIndent indent) override
bool ReorientVolumeStart(vtkMRMLCropVolumeParametersNode *parametersNode)
static void SnapROIToWorld(vtkMRMLCropVolumeParametersNode *parametersNode)
int CropInterpolated(vtkMRMLDisplayableNode *roi, vtkMRMLVolumeNode *inputVolume, vtkMRMLVolumeNode *outputNode, bool isotropicResampling, double spacingScale, int interpolationMode, double fillValue)
Perform interpolated cropping.
static bool IsROIAlignedWithInputVolume(vtkMRMLCropVolumeParametersNode *parametersNode)
static bool IsROIAlignedWithWorld(vtkMRMLCropVolumeParametersNode *parametersNode)
static int CropVoxelBased(vtkMRMLDisplayableNode *roi, vtkMRMLVolumeNode *inputVolume, vtkMRMLVolumeNode *outputNode, bool limitToInputExtent=true, double fillValue=0.0)
static bool FitROIToInputVolume(vtkMRMLCropVolumeParametersNode *parametersNode)