13 #ifndef mitkCreateDistanceImageFromSurfaceFilter_h
14 #define mitkCreateDistanceImageFromSurfaceFilter_h
22 #include "vnl/vnl_vector_fixed.h"
24 #include "itkImageBase.h"
26 #include <itkeigen/Eigen/Dense>
78 itkFactorylessNewMacro(
Self);
80 itkGetMacro(DistanceImageSpacing,
double);
82 using Superclass::SetInput;
87 virtual void SetInput(
unsigned int idx,
const mitk::Surface *surface);
100 itkSetMacro(DistanceImageVolume,
unsigned int);
102 void PrintEquationSystem();
112 void SetUseProgressBar(
bool);
119 void SetProgressStepSize(
unsigned int stepSize);
121 void SetReferenceImage(itk::ImageBase<3>::Pointer referenceImage);
126 void GenerateData()
override;
127 void GenerateOutputInformation()
override;
130 void CreateSolutionMatrixAndFunctionValues();
131 double CalculateDistanceValue(
PointType p);
133 void FillDistanceImage();
149 void DetermineBounds(DistanceImageType::PointType &minPointInWorldCoordinates,
150 DistanceImageType::PointType &maxPointInWorldCoordinates,
151 DistanceImageType::IndexType &minPointInIndexCoordinates,
152 DistanceImageType::IndexType &maxPointInIndexCoordinates);
154 void PreprocessContourPoints();
155 void CreateEmptyDistanceImage();
161 Eigen::MatrixXd m_SolutionMatrix;
162 Eigen::VectorXd m_FunctionValues;
163 Eigen::VectorXd m_Weights;
165 DistanceImageType::Pointer m_DistanceImageITK;
166 itk::ImageBase<3>::Pointer m_ReferenceImage;
168 double m_DistanceImageSpacing;
169 double m_DistanceImageDefaultBufferValue;
170 unsigned int m_DistanceImageVolume;
172 bool m_UseProgressBar;
173 unsigned int m_ProgressStepSize;