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> >
154 typedef typename InputImageType::SizeType
SizeType;
166 #if USE_GRADIENT_RECURSIVE_GAUSSIAN
199 itkGetMacro( GenerateTriangleFaces,
bool );
200 itkSetMacro( GenerateTriangleFaces,
bool );
201 itkBooleanMacro( GenerateTriangleFaces );
206 itkGetMacro( ProjectVerticesToIsoSurface,
bool );
207 itkSetMacro( ProjectVerticesToIsoSurface,
bool );
208 itkBooleanMacro( ProjectVerticesToIsoSurface );
217 itkGetMacro( ProjectVertexSurfaceDistanceThreshold,
double );
224 itkGetMacro( ProjectVertexStepLength,
double );
225 itkSetClampMacro( ProjectVertexStepLength,
double, 0.0, 100000.0 );
232 itkGetMacro( ProjectVertexStepLengthRelaxationFactor,
double );
233 itkSetClampMacro( ProjectVertexStepLengthRelaxationFactor,
double, 0.0, 1.0 );
238 itkGetMacro( ProjectVertexMaximumNumberOfSteps,
unsigned int );
239 itkSetMacro( ProjectVertexMaximumNumberOfSteps,
unsigned int );
290 template<
class TMeshType >
297 typedef std::map< VertexLookupNode, PointIdentifier >
MapType;
309 m_Map.insert(
typename MapType::value_type(node,
id) );
320 typename MapType::iterator it =
m_Map.find( node );
321 if ( it !=
m_Map.end() )
357 unsigned int m_ProjectVertexTerminate[3];
363 #ifndef ITK_MANUAL_INSTANTIATION
364 #include "itkCuberilleImageToMeshFilter.hxx"
bool operator<=(const Self &node) const
void PrintSelf(std::ostream &os, Indent indent) const
Const version of ShapedNeighborhoodIterator, defining iteration of a local N-dimensional neighborhood...
SpacingValueType m_MaxSpacing
bool operator<(const Self &node) const
GradientFilterType::Pointer GradientFilterPointer
bool m_ProjectVerticesToIsoSurface
VertexLookupMap< OutputMeshType > VertexLookupMapType
InputPixelType m_IsoSurfaceValue
InputImageType::IndexType IndexType
bool operator>=(const Self &node) const
Light weight base class for most itk classes.
itkGetObjectMacro(Interpolator, InterpolatorType)
TOutputMesh OutputMeshType
QuadrilateralCellType::SelfAutoPointer QuadrilateralAutoPointer
void operator=(const Self &)
unsigned int m_ProjectVertexMaximumNumberOfSteps
GradientInterpolatorPointer m_GradientInterpolator
CellInterface< OutputPixelType, CellTraits > CellInterfaceType
SmartPointer< Self > Pointer
InterpolatorPointer m_Interpolator
VertexLookupNode(unsigned long x, unsigned long y)
OutputMeshType::PointType PointType
void ComputeGradientImage()
double m_ProjectVertexSurfaceDistanceThreshold
InterpolatorType::OutputType InterpolatorOutputType
bool operator>(const Self &node) const
GradientInterpolatorType::Pointer GradientInterpolatorPointer
TriangleCell< CellInterfaceType > TriangleCellType
bool m_GenerateTriangleFaces
OutputMeshType::MeshTraits OutputMeshTraits
InputImageType::SizeType SizeType
GradientFilterType::OutputImageType GradientImageType
InputImageType::SpacingType SpacingType
Computes the gradient of an image by convolution with the first derivative of a Gaussian.
TOutputImageType OutputImageType
TOutputMesh OutputMeshType
QuadrilateralCellType::CellAutoPointer QuadrilateralCellAutoPointer
An abstract interface for cells.
void SetVerticesFromFace(unsigned int face, bool *vertexHasQuad)
virtual void SetInput(const InputImageType *inputImage)
SmartPointer< const Self > ConstPointer
QuadrilateralCell< CellInterfaceType > QuadrilateralCellType
OutputMeshType::CellsContainerPointer CellsContainerPointer
OutputMeshType::PointIdentifier PointIdentifier
InterpolatorType::Pointer InterpolatorPointer
ImageToMeshFilter is the base class for all process objects that output Mesh data and require image d...
GradientFilterType::OutputPixelType GradientPixelType
GradientImageType::Pointer GradientImagePointer
CuberilleImageToMeshFilter Self
void ProjectVertexToIsoSurface(PointType &vertex)
TMeshType::PointIdentifier PointIdentifier
OutputMeshType::CellIdentifier CellIdentifier
GradientImageFilter< InputImageType > GradientFilterType
TriangleCellType::CellAutoPointer TriangleCellAutoPointer
void AddVertex(PointIdentifier &id, IndexType index, const InputImageType *image, OutputMeshType *mesh)
std::map< VertexLookupNode, PointIdentifier > MapType
InputImageType::PixelType InputPixelType
ConstShapedNeighborhoodIterator< InputImageType > InputImageIteratorType
IndexType GetVertexLookupIndex(unsigned int vertex, IndexType index)
OutputMeshType::CellTraits CellTraits
TInputImage InputImageType
itk::VectorLinearInterpolateImageFunction< GradientImageType > GradientInterpolatorType
InputImageType::ConstPointer InputImageConstPointer
~CuberilleImageToMeshFilter()
TInputImage InputImageType
TriangleCellType::SelfAutoPointer TriangleAutoPointer
InputImageType::Pointer InputImagePointer
OutputImageType::PixelType OutputPixelType
void AddQuadFace(CellIdentifier &id, PointIdentifier f[4], OutputMeshType *mesh)
ImageToMeshFilter< TInputImage, TOutputMesh > Superclass
InputImageType::SpacingValueType SpacingValueType
OutputMeshType::PointType OutputPointType
Control indentation during Print() invocation.
void SetInput(unsigned int idx, const InputImageType *input)
TInterpolator InterpolatorType
OutputMeshType::CellsContainer CellsContainer
OutputMeshType::Pointer OutputMeshPointer
Define additional traits for native types such as int or float.
bool GetVertex(unsigned int x, unsigned int y, PointIdentifier &id)
Represents a quadrilateral for a Mesh.
OutputMeshType::PointsContainer PointsContainer
double m_ProjectVertexStepLength
void AddVertex(unsigned int x, unsigned int y, PointIdentifier id)
double m_ProjectVertexStepLengthRelaxationFactor
OutputMeshType::PointsContainerPointer PointsContainerPointer
Linearly interpolate a vector image at specified positions.
Computes the gradient of an image using directional derivatives.
OutputMeshTraits::PixelType OutputPixelType
CuberilleImageToMeshFilter()
virtual void GenerateOutputInformation()