18 #ifndef itkCuberilleImageToMeshFilter_h
19 #define itkCuberilleImageToMeshFilter_h
22 #define USE_GRADIENT_RECURSIVE_GAUSSIAN 0
23 #define USE_ADVANCED_PROJECTION 0
24 #define USE_LINESEARCH_PROJECTION 0
113 template <
class TInputImage,
class TOutputMesh,
class TInterpolator=itk::LinearInterpolateImageFunction<TInputImage> >
168 #if USE_GRADIENT_RECURSIVE_GAUSSIAN
201 itkGetMacro( GenerateTriangleFaces,
bool );
202 itkSetMacro( GenerateTriangleFaces,
bool );
203 itkBooleanMacro( GenerateTriangleFaces );
208 itkGetMacro( ProjectVerticesToIsoSurface,
bool );
209 itkSetMacro( ProjectVerticesToIsoSurface,
bool );
210 itkBooleanMacro( ProjectVerticesToIsoSurface );
219 itkGetMacro( ProjectVertexSurfaceDistanceThreshold,
double );
226 itkGetMacro( ProjectVertexStepLength,
double );
227 itkSetClampMacro( ProjectVertexStepLength,
double, 0.0, 100000.0 );
234 itkGetMacro( ProjectVertexStepLengthRelaxationFactor,
double );
235 itkSetClampMacro( ProjectVertexStepLengthRelaxationFactor,
double, 0.0, 1.0 );
240 itkGetMacro( ProjectVertexMaximumNumberOfSteps,
unsigned int );
241 itkSetMacro( ProjectVertexMaximumNumberOfSteps,
unsigned int );
289 template<
class TMeshType >
296 using MapType = std::map< VertexLookupNode, PointIdentifier >;
308 m_Map.insert(
typename MapType::value_type(node,
id) );
319 auto it =
m_Map.find( node );
320 if ( it !=
m_Map.end() )
367 unsigned int m_ProjectVertexTerminate[3];
373 #ifndef ITK_MANUAL_INSTANTIATION
374 #include "itkCuberilleImageToMeshFilter.hxx"
bool operator<=(const Self &node) const
Const version of ShapedNeighborhoodIterator, defining iteration of a local N-dimensional neighborhood...
SpacingValueType m_MaxSpacing
typename OutputMeshType::PointType PointType
typename InputImageType::PixelType InputPixelType
bool operator<(const Self &node) const
bool m_ProjectVerticesToIsoSurface
InputPixelType m_IsoSurfaceValue
bool operator>=(const Self &node) const
Light weight base class for most itk classes.
typename InputImageType::SpacingValueType SpacingValueType
unsigned int m_ProjectVertexMaximumNumberOfSteps
SmartPointer< Self > Pointer
typename OutputMeshType::CellsContainer CellsContainer
GradientInterpolatorPointer m_GradientInterpolator
Define numeric traits for std::vector.
typename OutputMeshType::PointsContainerPointer PointsContainerPointer
InterpolatorPointer m_Interpolator
VertexLookupNode(unsigned long x, unsigned long y)
void ComputeGradientImage()
double m_ProjectVertexSurfaceDistanceThreshold
typename OutputMeshTraits::PixelType OutputPixelType
typename GradientInterpolatorType::Pointer GradientInterpolatorPointer
bool operator>(const Self &node) const
typename GradientFilterType::OutputPixelType GradientPixelType
typename QuadrilateralCellType::SelfAutoPointer QuadrilateralAutoPointer
bool m_GenerateTriangleFaces
void GenerateOutputInformation() override
typename OutputImageType::PixelType OutputPixelType
typename TriangleCellType::CellAutoPointer TriangleCellAutoPointer
Computes the gradient of an image by convolution with the first derivative of a Gaussian.
~CuberilleImageToMeshFilter() override
typename TMeshType::PointIdentifier PointIdentifier
An abstract interface for cells.
typename OutputMeshType::Pointer OutputMeshPointer
void SetVerticesFromFace(unsigned int face, bool *vertexHasQuad)
virtual void SetInput(const InputImageType *inputImage)
typename GradientFilterType::OutputImageType GradientImageType
ImageToMeshFilter is the base class for all process objects that output Mesh data and require image d...
typename GradientImageType::Pointer GradientImagePointer
SmartPointer< Self > Pointer
TInterpolator InterpolatorType
typename InputImageType::Pointer InputImagePointer
std::map< VertexLookupNode, PointIdentifier > MapType
void ProjectVertexToIsoSurface(PointType &vertex)
typename OutputMeshType::CellsContainerPointer CellsContainerPointer
typename OutputMeshType::PointsContainer PointsContainer
ImageBaseType::SizeType SizeType
typename InterpolatorType::OutputType InterpolatorOutputType
ImageBaseType::IndexType IndexType
void AddVertex(PointIdentifier &id, IndexType index, const InputImageType *image, OutputMeshType *mesh)
typename InterpolatorType::Pointer InterpolatorPointer
IndexType GetVertexLookupIndex(unsigned int vertex, IndexType index)
typename OutputMeshType::CellTraits CellTraits
typename TriangleCellType::SelfAutoPointer TriangleAutoPointer
void AddQuadFace(CellIdentifier &id, PointIdentifier f[4], OutputMeshType *mesh)
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
typename OutputMeshType::PointType OutputPointType
void SetInput(unsigned int idx, const InputImageType *input)
ImageBaseType::PointType PointType
typename GradientFilterType::Pointer GradientFilterPointer
typename QuadrilateralCellType::CellAutoPointer QuadrilateralCellAutoPointer
bool GetVertex(unsigned int x, unsigned int y, PointIdentifier &id)
typename OutputMeshType::MeshTraits OutputMeshTraits
typename InputImageType::ConstPointer InputImageConstPointer
Represents a quadrilateral for a Mesh.
TOutputImageType OutputImageType
typename OutputMeshType::PointIdentifier PointIdentifier
TInputImage InputImageType
typename InputImageType::IndexType IndexType
double m_ProjectVertexStepLength
void AddVertex(unsigned int x, unsigned int y, PointIdentifier id)
double m_ProjectVertexStepLengthRelaxationFactor
typename InputImageType::SizeType SizeType
void GenerateData() override
typename OutputMeshType::CellIdentifier CellIdentifier
Linearly interpolate a vector image at specified positions.
TOutputMesh OutputMeshType
Computes the gradient of an image using directional derivatives.
typename InputImageType::SpacingType SpacingType
CuberilleImageToMeshFilter()