From: Simon Rit Date: Tue, 2 Sep 2014 06:38:26 +0000 (+0200) Subject: COMP: ITK v4.6 X-Git-Tag: v1.4.0~111 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=1eb88e752e0985548fc83742ed92ab395f9c77fc;p=clitk.git COMP: ITK v4.6 --- diff --git a/common/clitkDicomRTStruct2ImageFilter.h b/common/clitkDicomRTStruct2ImageFilter.h index 8f6045a..0df00dd 100644 --- a/common/clitkDicomRTStruct2ImageFilter.h +++ b/common/clitkDicomRTStruct2ImageFilter.h @@ -18,7 +18,7 @@ =========================================================================*/ #ifndef CLITKDICOMRTSTRUCT2IMAGEFILTER_H -#define CLITKDICOMRT_TRUCT2IMAGEFILTER_H +#define CLITKDICOMRTSTRUCT2IMAGEFILTER_H #include "clitkDicomRT_ROI.h" #include "clitkImageCommon.h" diff --git a/itk/clitkVectorBSplineDecompositionImageFilterWithOBD.txx b/itk/clitkVectorBSplineDecompositionImageFilterWithOBD.txx index c29c6ef..7bc3165 100644 --- a/itk/clitkVectorBSplineDecompositionImageFilterWithOBD.txx +++ b/itk/clitkVectorBSplineDecompositionImageFilterWithOBD.txx @@ -291,8 +291,8 @@ VectorBSplineDecompositionImageFilterWithOBD InputIterator inIt( this->GetInput(), this->GetInput()->GetBufferedRegion() ); OutputIterator outIt( this->GetOutput(), this->GetOutput()->GetBufferedRegion() ); - inIt = inIt.Begin(); - outIt = outIt.Begin(); + inIt.GoToBegin(); + outIt.GoToBegin(); OutputPixelType v; while ( !outIt.IsAtEnd() ) { for (unsigned int i=0; i< VectorDimension; i++) { diff --git a/registration/clitkBLUTDIRGenericFilter.cxx b/registration/clitkBLUTDIRGenericFilter.cxx index c786eeb..b49d990 100644 --- a/registration/clitkBLUTDIRGenericFilter.cxx +++ b/registration/clitkBLUTDIRGenericFilter.cxx @@ -30,7 +30,16 @@ It is distributed under dual licence #include "clitkBLUTDIRGenericFilter.h" #include "clitkBLUTDIRCommandIterationUpdateDVF.h" #include "itkCenteredTransformInitializer.h" - +#if ITK_VERSION_MAJOR >= 4 +# if ITK_VERSION_MINOR < 6 +# include "itkTransformToDisplacementFieldSource.h" +# else +# include "itkTransformToDisplacementFieldFilter.h" +# endif +#else +# include "itkTransformToDeformationFieldSource.h" +#endif + namespace clitk { @@ -793,7 +802,11 @@ namespace clitk typedef itk::Vector< float, SpaceDimension > DisplacementType; typedef itk::Image< DisplacementType, InputImageType::ImageDimension > DisplacementFieldType; #if ITK_VERSION_MAJOR >= 4 +# if ITK_VERSION_MINOR < 6 typedef itk::TransformToDisplacementFieldSource ConvertorType; +# else + typedef itk::TransformToDisplacementFieldFilter ConvertorType; +# endif #else typedef itk::TransformToDeformationFieldSource ConvertorType; #endif @@ -804,7 +817,11 @@ namespace clitk else transform->SetBulkTransform(NULL); filter->SetTransform(regTransform); +#if ITK_VERSION_MAJOR > 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR >= 6) + filter->SetReferenceImage(fixedImage); +#else filter->SetOutputParametersFromImage(fixedImage); +#endif filter->Update(); typename DisplacementFieldType::Pointer field = filter->GetOutput(); diff --git a/registration/clitkBLUTDIRGenericFilter.h b/registration/clitkBLUTDIRGenericFilter.h index eda242f..18e1600 100644 --- a/registration/clitkBLUTDIRGenericFilter.h +++ b/registration/clitkBLUTDIRGenericFilter.h @@ -60,11 +60,6 @@ #include "itkLabelGeometryImageFilter.h" #include "itkImageDuplicator.h" #include "itkExtractImageFilter.h" -#if ITK_VERSION_MAJOR >= 4 - #include "itkTransformToDisplacementFieldSource.h" -#else - #include "itkTransformToDeformationFieldSource.h" -#endif namespace clitk { diff --git a/registration/clitkBSplineDeformableTransform.txx b/registration/clitkBSplineDeformableTransform.txx index 9d7cc6b..4d0f50d 100644 --- a/registration/clitkBSplineDeformableTransform.txx +++ b/registration/clitkBSplineDeformableTransform.txx @@ -16,7 +16,7 @@ - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html ===========================================================================**/ #ifndef __clitkBSplineDeformableTransform_txx -#define __clitkBSplineDeformableTransform_tx +#define __clitkBSplineDeformableTransform_txx #include "clitkBSplineDeformableTransform.h" //itk diff --git a/registration/clitkConvertBLUTCoeffsToVFFilter.h b/registration/clitkConvertBLUTCoeffsToVFFilter.h index 3cd1e67..76b1578 100644 --- a/registration/clitkConvertBLUTCoeffsToVFFilter.h +++ b/registration/clitkConvertBLUTCoeffsToVFFilter.h @@ -8,9 +8,13 @@ #include "clitkBSplineDeformableTransform.h" #include "itkBSplineDeformableTransform.h" #if ITK_VERSION_MAJOR >= 4 -#include "itkTransformToDisplacementFieldSource.h" +# if ITK_VERSION_MINOR < 6 +# include "itkTransformToDisplacementFieldSource.h" +# else +# include "itkTransformToDisplacementFieldFilter.h" +# endif #else -#include "itkTransformToDeformationFieldSource.h" +# include "itkTransformToDeformationFieldSource.h" #endif namespace clitk @@ -46,7 +50,11 @@ namespace clitk typedef itk::Transform< double, TDVFType::ImageDimension, TDVFType::ImageDimension> GenericTransformType; #if ITK_VERSION_MAJOR >= 4 +# if ITK_VERSION_MINOR < 6 typedef itk::TransformToDisplacementFieldSource ConvertorType; +# else + typedef itk::TransformToDisplacementFieldFilter ConvertorType; +# endif #else typedef itk::TransformToDeformationFieldSource ConvertorType; #endif @@ -90,4 +98,4 @@ namespace clitk #include "clitkConvertBLUTCoeffsToVFFilter.txx" -#endif // clitkConvertBLUTCoeffsToVFFilter_h \ No newline at end of file +#endif // clitkConvertBLUTCoeffsToVFFilter_h diff --git a/registration/clitkConvertBLUTCoeffsToVFFilter.txx b/registration/clitkConvertBLUTCoeffsToVFFilter.txx index ae1f9d5..d10bcbb 100644 --- a/registration/clitkConvertBLUTCoeffsToVFFilter.txx +++ b/registration/clitkConvertBLUTCoeffsToVFFilter.txx @@ -7,11 +7,6 @@ //#include "clitkConvertBSplineDeformableTransformToVFGenericFilter.h" #include "clitkVectorImageToImageFilter.h" -#if ITK_VERSION_MAJOR >= 4 -#include "itkTransformToDisplacementFieldSource.h" -#else -#include "itkTransformToDeformationFieldSource.h" -#endif #include "itkBSplineDeformableTransform.h" namespace clitk @@ -186,9 +181,13 @@ namespace clitk m_GenericTransform = m_ITKTransform; } +#if ITK_VERSION_MAJOR > 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR >= 6) + m_Filter->SetReferenceImage(output); +#else m_Filter->SetOutputOrigin(output->GetOrigin()); m_Filter->SetOutputSpacing(output->GetSpacing()); m_Filter->SetOutputSize(output->GetLargestPossibleRegion().GetSize()); +#endif m_Filter->SetTransform(m_GenericTransform); m_Filter->Update(); diff --git a/registration/clitkMatrixTransformToVFGenericFilter.h b/registration/clitkMatrixTransformToVFGenericFilter.h index 717e938..cc6ae00 100644 --- a/registration/clitkMatrixTransformToVFGenericFilter.h +++ b/registration/clitkMatrixTransformToVFGenericFilter.h @@ -37,9 +37,13 @@ //itk include #include "itkLightObject.h" #if ITK_VERSION_MAJOR >= 4 - #include "itkTransformToDisplacementFieldSource.h" +# if ITK_VERSION_MINOR < 6 +# include "itkTransformToDisplacementFieldSource.h" +# else +# include "itkTransformToDisplacementFieldFilter.h" +# endif #else - #include "itkTransformToDeformationFieldSource.h" +# include "itkTransformToDeformationFieldSource.h" #endif #include "itkAffineTransform.h" diff --git a/registration/clitkMatrixTransformToVFGenericFilter.txx b/registration/clitkMatrixTransformToVFGenericFilter.txx index ebc0e45..d864900 100644 --- a/registration/clitkMatrixTransformToVFGenericFilter.txx +++ b/registration/clitkMatrixTransformToVFGenericFilter.txx @@ -79,10 +79,15 @@ namespace clitk // Filter #if ITK_VERSION_MAJOR >= 4 +# if ITK_VERSION_MINOR < 6 typedef itk::TransformToDisplacementFieldSource ConvertorType; +# else + typedef itk::TransformToDisplacementFieldFilter ConvertorType; +# endif #else typedef itk::TransformToDeformationFieldSource ConvertorType; #endif + typename ConvertorType::Pointer filter= ConvertorType::New(); // Output image info @@ -94,7 +99,11 @@ namespace clitk reader2->Update(); typename OutputImageType::Pointer image=reader2->GetOutput(); - filter->SetOutputParametersFromImage(image); +#if ITK_VERSION_MAJOR > 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR >= 6) + filter->SetReferenceImage(image); +#else + filter->SetOutputParametersFromImage(image); +#endif } else { @@ -118,8 +127,12 @@ namespace clitk typename OutputImageType::SizeType size; for(i=0;iSetOutputSize(size); - } +#if ITK_VERSION_MAJOR > 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR >= 6) + filter->SetSize(size); +#else + filter->SetOutputSize(size); +#endif + } } // Transform diff --git a/vv/vtkVOXImageWriter.h b/vv/vtkVOXImageWriter.h index 89b11a8..d64fbf0 100644 --- a/vv/vtkVOXImageWriter.h +++ b/vv/vtkVOXImageWriter.h @@ -15,7 +15,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html ===========================================================================**/ -#ifndef __vtkVoxImageWriter_h +#ifndef __vtkVOXImageWriter_h #define __vtkVOXImageWriter_h #include "vtkImageWriter.h" #include diff --git a/vv/vvSurfaceViewerDialog.h b/vv/vvSurfaceViewerDialog.h index 90e8b98..88a75a6 100644 --- a/vv/vvSurfaceViewerDialog.h +++ b/vv/vvSurfaceViewerDialog.h @@ -46,7 +46,7 @@ private : vtkPolyDataMapper* mMapper; vtkActor* mActor; vtkRenderer * mRenderer; - unsigned int mCurrentTime; + int mCurrentTime; }; // end class vvSurfaceViewerDialog //====================================================================