X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=filters%2FclitkVFResampleGenericFilter.h;h=351a6fc1e1166b63e86c9de21c7e29b8135a9e4e;hb=fdb804fa1b0e67f22f35420396fa015c1c2946d5;hp=b1c4568dd133d1caebd1a65bf1833cdc31f94ea1;hpb=931a42358442f4ee4f314613c991c838d4b4e3b7;p=clitk.git diff --git a/filters/clitkVFResampleGenericFilter.h b/filters/clitkVFResampleGenericFilter.h index b1c4568..351a6fc 100644 --- a/filters/clitkVFResampleGenericFilter.h +++ b/filters/clitkVFResampleGenericFilter.h @@ -1,6 +1,22 @@ +/*========================================================================= + 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 CLITKIMAGERESAMPLEGENERICFILTER_H #define CLITKIMAGERESAMPLEGENERICFILTER_H - /** ------------------------------------------------------------------- * @file clitkVFResampleGenericFilter.h @@ -34,15 +50,15 @@ namespace clitk { //-------------------------------------------------------------------- - class VFResampleGenericFilter: public clitk::ImageToImageGenericFilter { + class VFResampleGenericFilter: + public clitk::ImageToImageGenericFilter { public: // constructor VFResampleGenericFilter(); // Types - typedef VFResampleGenericFilter Self; - typedef ImageToImageGenericFilter Superclass; + typedef VFResampleGenericFilter Self; typedef itk::SmartPointer Pointer; typedef itk::SmartPointer ConstPointer; @@ -57,9 +73,13 @@ namespace clitk { void SetBSplineOrder(int o) { mBSplineOrder = o; } void SetBLUTSampling(int b) { mSamplingFactors.resize(1); mSamplingFactors[0] = b; } - void Update(); + //-------------------------------------------------------------------- + // Main function called each time the filter is updated + template + void UpdateWithInputImageType(); protected: + template void InitializeImageType(); //-------------------------------------------------------------------- std::string mInterpolatorName; std::vector mOutputSize; @@ -72,12 +92,8 @@ namespace clitk { std::vector mSamplingFactors; //-------------------------------------------------------------------- - template void Update_WithDim(); - template void Update_WithDimAndPixelType(); template void Update_WithDimAndPixelTypeAndComponent(); - - //-------------------------------------------------------------------- template typename ImageType::Pointer ComputeImage(typename ImageType::Pointer inputImage);