13 #ifndef mitkPlanarFigureMaskGenerator_h
14 #define mitkPlanarFigureMaskGenerator_h
21 #include <vtkSmartPointer.h>
56 void SetTimeStep(
unsigned int timeStep)
override;
58 itkGetConstMacro(PlanarFigureAxis,
unsigned int);
59 itkGetConstMacro(PlanarFigureSlice,
unsigned int);
68 m_ReferenceImage(nullptr),
69 m_PlanarFigureAxis(0),
70 m_InternalMaskUpdateTime(0),
71 m_PlanarFigureSlice(0)
79 template <
typename TPixel,
unsigned int VImageDimension>
80 void InternalCalculateMaskFromPlanarFigure(
const itk::Image<TPixel, VImageDimension> *image,
unsigned int axis);
82 template <
typename TPixel,
unsigned int VImageDimension>
83 void InternalCalculateMaskFromOpenPlanarFigure(
const itk::Image<TPixel, VImageDimension> *image,
unsigned int axis);
91 template <
typename ITK_Exporter,
typename VTK_Importer>
92 void ConnectPipelines(ITK_Exporter exporter, vtkSmartPointer<VTK_Importer> importer)
94 importer->SetUpdateInformationCallback(exporter->GetUpdateInformationCallback());
96 importer->SetPipelineModifiedCallback(exporter->GetPipelineModifiedCallback());
97 importer->SetWholeExtentCallback(exporter->GetWholeExtentCallback());
98 importer->SetSpacingCallback(exporter->GetSpacingCallback());
99 importer->SetOriginCallback(exporter->GetOriginCallback());
100 importer->SetScalarTypeCallback(exporter->GetScalarTypeCallback());
102 importer->SetNumberOfComponentsCallback(exporter->GetNumberOfComponentsCallback());
104 importer->SetPropagateUpdateExtentCallback(exporter->GetPropagateUpdateExtentCallback());
105 importer->SetUpdateDataCallback(exporter->GetUpdateDataCallback());
106 importer->SetDataExtentCallback(exporter->GetDataExtentCallback());
107 importer->SetBufferPointerCallback(exporter->GetBufferPointerCallback());
108 importer->SetCallbackUserData(exporter->GetCallbackUserData());
112 template <
typename VTK_Exporter,
typename ITK_Importer>
113 void ConnectPipelines(vtkSmartPointer<VTK_Exporter> exporter, ITK_Importer importer)
115 importer->SetUpdateInformationCallback(exporter->GetUpdateInformationCallback());
117 importer->SetPipelineModifiedCallback(exporter->GetPipelineModifiedCallback());
118 importer->SetWholeExtentCallback(exporter->GetWholeExtentCallback());
119 importer->SetSpacingCallback(exporter->GetSpacingCallback());
120 importer->SetOriginCallback(exporter->GetOriginCallback());
121 importer->SetScalarTypeCallback(exporter->GetScalarTypeCallback());
123 importer->SetNumberOfComponentsCallback(exporter->GetNumberOfComponentsCallback());
125 importer->SetPropagateUpdateExtentCallback(exporter->GetPropagateUpdateExtentCallback());
126 importer->SetUpdateDataCallback(exporter->GetUpdateDataCallback());
127 importer->SetDataExtentCallback(exporter->GetDataExtentCallback());
128 importer->SetBufferPointerCallback(exporter->GetBufferPointerCallback());
129 importer->SetCallbackUserData(exporter->GetCallbackUserData());
132 bool IsUpdateRequired()
const;
135 itk::Image<unsigned short, 2>::Pointer m_InternalITKImageMask2D;
138 unsigned int m_PlanarFigureAxis;
139 unsigned long m_InternalMaskUpdateTime;
140 unsigned int m_PlanarFigureSlice;