21#ifndef __vtkSlicerCropVolumeLogic_h
22#define __vtkSlicerCropVolumeLogic_h
33#include "vtkSlicerCropVolumeModuleLogicExport.h"
71 void PrintSelf(ostream& os, vtkIndent indent)
override;
79 vtkMRMLVolumeNode* outputNode,
bool limitToInputExtent=
true,
double fillValue=0.0);
84 int outputExtent[6],
bool limitToInputExtent=
false);
88 bool isotropicResampling,
double spacingScale,
int interpolationMode,
double fillValue);
92 bool isotropicResampling,
double spacingScale,
int outputExtent[6],
double outputSpacing[3]);
113 vtkInternal* Internal;
MRML node for representing a volume (image stack).
static void SnapROIToVoxelGrid(vtkMRMLCropVolumeParametersNode *parametersNode)
vtkSlicerCropVolumeLogic()
static vtkSlicerCropVolumeLogic * New()
int Apply(vtkMRMLCropVolumeParametersNode *)
Crop input volume using the specified ROI node.
~vtkSlicerCropVolumeLogic() override
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
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 int CropVoxelBased(vtkMRMLDisplayableNode *roi, vtkMRMLVolumeNode *inputVolume, vtkMRMLVolumeNode *outputNode, bool limitToInputExtent=true, double fillValue=0.0)
static bool FitROIToInputVolume(vtkMRMLCropVolumeParametersNode *parametersNode)