X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FclitkCropLikeImageFilter.h;h=c8fae32891eef1c3a7b1f305fcf4e3fbb716cb06;hb=d8f6cf956310ff7b123df4ad82e20b61831d09ff;hp=d288dc4034d792ef34e554fd370c36a2ce6d536a;hpb=709d3deddba827afcff948a7ebfe8d4908e72f8f;p=clitk.git diff --git a/itk/clitkCropLikeImageFilter.h b/itk/clitkCropLikeImageFilter.h index d288dc4..c8fae32 100644 --- a/itk/clitkCropLikeImageFilter.h +++ b/itk/clitkCropLikeImageFilter.h @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,11 +14,15 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html - ======================================================================-====*/ + ===========================================================================**/ #ifndef CLITKCROPLIKEIMAGEFILTER_H #define CLITKCROPLIKEIMAGEFILTER_H +// clitk +#include "clitkBoundingBoxUtils.h" + +// itk #include namespace clitk { @@ -64,8 +68,9 @@ namespace clitk { /** ImageDimension constants */ itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension); - - // void Update() { GenerateOutputInformation(); GenerateData(); } + + // I dont want to verify inputs information + virtual void VerifyInputInformation() { } protected: CropLikeImageFilter(); @@ -82,7 +87,6 @@ namespace clitk { bool m_LikeFilenameIsGiven; PointType m_Origin; const itk::ImageBase * m_LikeImage; - //typename ImageType::Pointer m_LikeImage; std::vector m_CropAlongThisDimension; PointType m_StartPoint; // start point in physical world @@ -100,6 +104,28 @@ namespace clitk { }; // end class //-------------------------------------------------------------------- + + //-------------------------------------------------------------------- + // Convenient function + template + typename ImageType::Pointer + ResizeImageLike(const ImageType * input, + const itk::ImageBase * like, + typename ImageType::PixelType BG); + + template + typename ImageType::Pointer + ResizeImageLike(const ImageType * input, + typename itk::ImageBase::RegionType * like, + typename ImageType::PixelType BG); + + template + typename ImageType::Pointer + ResizeImageLike(const ImageType * input, + typename itk::BoundingBox::Pointer bb, + typename ImageType::PixelType BG); + + } // end namespace clitk //--------------------------------------------------------------------