/*========================================================================= Program: Insight Segmentation & Registration Toolkit Module: $RCSfile: itkEllipseBoundaryToImageFilter.h,v $ Language: C++ Date: $$ Version: $Revision: 1.00 $ Copyright (c) Insight Software Consortium. All rights reserved. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef __itkEllipseBoundaryToImageFilter_h #define __itkEllipseBoundaryToImageFilter_h #include "itkSpatialObjectToImageFilter.h" #include "itkPointSet.h" #include "itkPointSetToImageFilter.h" #include "itkEllipseSpatialObject.h" namespace itk { /** \class EllipseBoundaryToImageFilter * \brief filter that takes a EllipseBoundary * as input and produce an image as output, which shows the boundary of the ellipse. * This filter is more efficient than SpatialObjectToImage because it doesn't traverse * the whole image. * By default, if the user does not specify the size of the output image, * the maximum size of the object's bounding box is used. * The spacing of the image is given by the spacing of the input * EllipseSpatial object. */ template < class TInputSpatialObject , class TOutputImage > class ITK_EXPORT EllipseBoundaryToImageFilter : public SpatialObjectToImageFilter { public: /** Standard class typedefs. */ typedef EllipseBoundaryToImageFilter Self; typedef SpatialObjectToImageFilter Superclass; typedef SmartPointer Pointer; typedef SmartPointer ConstPointer; typedef typename TOutputImage::SizeType SizeType; typedef typename TOutputImage::PointType PointType; typedef TOutputImage OutputImageType; typedef typename OutputImageType::Pointer OutputImagePointer; typedef typename OutputImageType::ValueType ValueType; typedef typename OutputImageType::SpacingType SpacingType; /** Method for creation through the object factory. */ itkNewMacro(Self); /** Run-time type information (and related methods). */ itkTypeMacro(EllipseBoundaryToImageFilter, SpatialObjectToImage ); /** Superclass typedefs. */ typedef typename Superclass::OutputImageRegionType OutputImageRegionType; /** Some convenient typedefs. */ typedef TInputSpatialObject InputSpatialObjectType; typedef typename InputSpatialObjectType::Pointer InputSpatialObjectPointer; typedef typename InputSpatialObjectType::ConstPointer InputSpatialObjectConstPointer; typedef typename InputSpatialObjectType::ChildrenListType ChildrenListType; typedef typename TOutputImage::PixelType PixelType ; /** ImageDimension constants */ itkStaticConstMacro(ObjectDimension, unsigned int, InputSpatialObjectType::ObjectDimension); itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension); protected: typedef PointSet< double , ObjectDimension > PointSetType; typedef PointSetToImageFilter PointSetFilterType; typedef typename InputSpatialObjectType::TransformType TransformType ; EllipseBoundaryToImageFilter(); ~EllipseBoundaryToImageFilter(); virtual void GenerateOutputInformation(){}; // do nothing virtual void GenerateData(); typename PointSetFilterType::Pointer m_PointSetFilter ; private: EllipseBoundaryToImageFilter(const Self&); //purposely not implemented void operator=(const Self&); //purposely not implemented }; } // end namespace itk #ifndef ITK_MANUAL_INSTANTIATION #include "itkEllipseBoundaryToImageFilter.txx" #endif #endif