23 #ifndef vtkPolyDataToFractionalLabelmapFilter_h 24 #define vtkPolyDataToFractionalLabelmapFilter_h 28 #include <vtkPolyDataToImageStencil.h> 29 #include <vtkSmartPointer.h> 30 #include <vtkCellArray.h> 31 #include <vtkSetGet.h> 32 #include <vtkMatrix4x4.h> 33 #include <vtkCellLocator.h> 41 #include "vtkSegmentationCoreConfigure.h" 44 #define VTK_FRACTIONAL_DATA_TYPE VTK_CHAR 46 #if VTK_FRACTIONAL_DATA_TYPE == VTK_UNSIGNED_CHAR 47 #define FRACTIONAL_DATA_TYPE VTK_TYPE_NAME_UNSIGNED_CHAR 48 #define FRACTIONAL_MIN 0 49 #define FRACTIONAL_MAX 216 50 #define FRACTIONAL_STEP_SIZE 1 51 #elif VTK_FRACTIONAL_DATA_TYPE == VTK_CHAR 52 #define FRACTIONAL_DATA_TYPE VTK_TYPE_NAME_CHAR 53 #define FRACTIONAL_MIN -108 54 #define FRACTIONAL_MAX 108 55 #define FRACTIONAL_STEP_SIZE 1 56 #elif VTK_FRACTIONAL_DATA_TYPE == VTK_FLOAT 57 #define FRACTIONAL_DATA_TYPE VTK_TYPE_NAME_FLOAT 58 #define FRACTIONAL_MIN 0.0 59 #define FRACTIONAL_MAX 1.0 60 #define FRACTIONAL_STEP_SIZE (1.0/216.0) 64 public vtkPolyDataToImageStencil
67 std::map<double, vtkSmartPointer<vtkCellArray> > LinesCache;
68 std::map<double, vtkSmartPointer<vtkPolyData> > SliceCache;
69 std::map<double, vtkIdType*> PointIdsCache;
70 std::map<double, vtkIdType> NptsCache;
71 std::map<double, vtkSmartPointer<vtkIdTypeArray> > PointNeighborCountsCache;
73 vtkCellLocator* CellLocator;
85 void SetOutputImageToWorldMatrix(vtkMatrix4x4* imageToWorldMatrix);
86 void GetOutputImageToWorldMatrix(vtkMatrix4x4* imageToWorldMatrix);
88 using Superclass::GetOutputOrigin;
89 double* GetOutputOrigin() VTK_OVERRIDE;
90 void GetOutputOrigin(
double origin[3]) VTK_OVERRIDE;
92 void SetOutputOrigin(
double origin[3]) VTK_OVERRIDE;
93 void SetOutputOrigin(
double x,
double y,
double z) VTK_OVERRIDE;
96 double* GetOutputSpacing() VTK_OVERRIDE;
97 void GetOutputSpacing(
double spacing[3]) VTK_OVERRIDE;
99 void SetOutputSpacing(
double spacing[3]) VTK_OVERRIDE;
100 void SetOutputSpacing(
double x,
double y,
double z) VTK_OVERRIDE;
106 vtkSetMacro(NumberOfOffsets,
int);
107 vtkGetMacro(NumberOfOffsets,
int);
113 virtual
int RequestData(vtkInformation *, vtkInformationVector **,
114 vtkInformationVector *) VTK_OVERRIDE;
116 virtual
int FillOutputPortInformation(
int, vtkInformation*) VTK_OVERRIDE;
123 void FillImageStencilData(vtkImageStencilData *output, vtkPolyData* closedSurface,
int extent[6]);
128 void AddBinaryLabelMapToFractionalLabelMap(vtkImageData* binaryLabelMap, vtkImageData* fractionalLabelMap);
135 void PolyDataCutter(vtkPolyData *input, vtkPolyData *output,
vtkPolyDataToImageStencil Superclass
Image data containing orientation information.