From: dsarrut Date: Thu, 21 Apr 2011 05:05:23 +0000 (+0200) Subject: merge cvs / git X-Git-Tag: v1.2.0~24^2~8 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=c88f528a0a2457b9310198993482a8f10a01a5a1;p=clitk.git merge cvs / git --- diff --git a/itk/clitkCoordinatesOfImageBoundariesCalculator.h b/itk/clitkCoordinatesOfImageBoundariesCalculator.h new file mode 100644 index 0000000..b9cd6e8 --- /dev/null +++ b/itk/clitkCoordinatesOfImageBoundariesCalculator.h @@ -0,0 +1,98 @@ +/*========================================================================= + Program: vv http://www.creatis.insa-lyon.fr/rio/vv + + Authors belong to: + - University of LYON http://www.universite-lyon.fr/ + - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the copyright notices for more information. + + It is distributed under dual licence + + - BSD See included LICENSE.txt file + - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html + ======================================================================-====*/ + +#ifndef CLITKCOORDINATESOFIMAGEBOUNDARIESCALCULATOR_H +#define CLITKCOORDINATESOFIMAGEBOUNDARIESCALCULATOR_H + +// clitk +#include "clitkCommon.h" + +namespace clitk { + + /* -------------------------------------------------------------------- + Convert a mesh composed of a list of 2D contours, into a 3D binray + image. + -------------------------------------------------------------------- */ + + template + class ITK_EXPORT CoordinatesOfImageBoundariesCalculator: public itk::ImageSource + { + + public: + /** Standard class typedefs. */ + typedef itk::ImageSource Superclass; + typedef CoordinatesOfImageBoundariesCalculator Self; + typedef itk::SmartPointer Pointer; + typedef itk::SmartPointer ConstPointer; + + /** Method for creation through the object factory. */ + itkNewMacro(Self); + + /** Run-time type information (and related methods). */ + itkTypeMacro(CoordinatesOfImageBoundariesCalculator, Superclass); + + /** ImageDimension constants */ + itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension); + typedef itk::Image FloatImageType; + + /** Some convenient typedefs. */ + typedef typename ImageType::ConstPointer ImageConstPointer; + typedef typename ImageType::Pointer ImagePointer; + typedef typename ImageType::RegionType RegionType; + typedef typename ImageType::PixelType PixelType; + typedef typename ImageType::SpacingType SpacingType; + typedef typename ImageType::SizeType SizeType; + typedef typename ImageType::PointType PointType; + typedef itk::Image SliceType; + + /** Input : initial image and object */ + itkSetMacro(Mesh, vtkSmartPointer); + itkGetConstMacro(Mesh, vtkSmartPointer); + + itkSetMacro(LikeImage, ImagePointer); + itkGetConstMacro(LikeImage, ImagePointer); + + // Options + + + protected: + CoordinatesOfImageBoundariesCalculator(); + virtual ~CoordinatesOfImageBoundariesCalculator() {} + + // virtual void GenerateOutputInformation(); + // virtual void GenerateInputRequestedRegion(); + virtual void GenerateData(); + + ImagePointer m_LikeImage; + vtkSmartPointer m_Mesh; + + private: + CoordinatesOfImageBoundariesCalculator(const Self&); //purposely not implemented + void operator=(const Self&); //purposely not implemented + + }; // end class + //-------------------------------------------------------------------- + +} // end namespace clitk +//-------------------------------------------------------------------- + +#ifndef ITK_MANUAL_INSTANTIATION +#include "clitkCoordinatesOfImageBoundariesCalculator.txx" +#endif + +#endif