Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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 
21 #ifndef __vtkSlicerCropVolumeLogic_h
22 #define __vtkSlicerCropVolumeLogic_h
23 
24 // Slicer includes
25 #include "vtkSlicerModuleLogic.h"
28 class vtkMRMLVolumeNode;
30 // vtk includes
31 class vtkMatrix4x4;
32 // CropVolumes includes
33 #include "vtkSlicerCropVolumeModuleLogicExport.h"
35 
36 
65 class VTK_SLICER_CROPVOLUME_MODULE_LOGIC_EXPORT vtkSlicerCropVolumeLogic
66  : public vtkSlicerModuleLogic
67 {
68 public:
69 
70  static vtkSlicerCropVolumeLogic *New();
72  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
73 
74  void SetVolumesLogic(vtkSlicerVolumesLogic* logic);
75  vtkSlicerVolumesLogic* GetVolumesLogic();
76 
77  void SetResampleLogic(vtkSlicerCLIModuleLogic* logic);
78  vtkSlicerCLIModuleLogic* GetResampleLogic();
79 
82 
84  static int CropVoxelBased(vtkMRMLAnnotationROINode* roi, vtkMRMLVolumeNode* inputVolume, vtkMRMLVolumeNode* outputNode);
85 
87  static bool GetVoxelBasedCropOutputExtent(vtkMRMLAnnotationROINode* roi, vtkMRMLVolumeNode* inputVolume, int outputExtent[6]);
88 
90  int CropInterpolated(vtkMRMLAnnotationROINode* roi, vtkMRMLVolumeNode* inputVolume, vtkMRMLVolumeNode* outputNode,
91  bool isotropicResampling, double spacingScale, int interpolationMode, double fillValue);
92 
94  static bool GetInterpolatedCropOutputGeometry(vtkMRMLAnnotationROINode* roi, vtkMRMLVolumeNode* inputVolume,
95  bool isotropicResampling, double spacingScale, int outputExtent[6], double outputSpacing[3]);
96 
99  static bool FitROIToInputVolume(vtkMRMLCropVolumeParametersNode* parametersNode);
100 
101  static void SnapROIToVoxelGrid(vtkMRMLCropVolumeParametersNode* parametersNode);
102 
103  static bool IsROIAlignedWithInputVolume(vtkMRMLCropVolumeParametersNode* parametersNode);
104 
105  virtual void RegisterNodes() VTK_OVERRIDE;
106 
107 protected:
109  virtual ~vtkSlicerCropVolumeLogic();
110 
111 private:
112  vtkSlicerCropVolumeLogic(const vtkSlicerCropVolumeLogic&); // Not implemented
113  void operator=(const vtkSlicerCropVolumeLogic&); // Not implemented
114 
115  class vtkInternal;
116  vtkInternal* Internal;
117 };
118 
119 #endif
120 
static vtkSlicerModuleLogic * New()
The Usual vtk class functions.
Logic for running CLI.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
MRML node for representing a volume (image stack).
Crop a volume to the specified region of interest.