20#ifndef __vtkSlicerCropVolumeLogic_h
21#define __vtkSlicerCropVolumeLogic_h
33#include "vtkSlicerCropVolumeModuleLogicExport.h"
68 void PrintSelf(ostream& os, vtkIndent indent)
override;
85 bool isotropicResampling,
87 int interpolationMode,
93 bool isotropicResampling,
96 double outputSpacing[3]);
126 vtkInternal* Internal;
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)
vtkSlicerCropVolumeLogic()
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)