]> Creatis software - clitk.git/blobdiff - itk/clitkBackProjectImageFilter.txx
Ensure compatibility with ITK < 4.12 for throw exception
[clitk.git] / itk / clitkBackProjectImageFilter.txx
index af78d849f80b1e1e66d9f131ee65dd939708e4d6..fa8d2613fec8815c80ae08abc3046a4000f65c81 100644 (file)
@@ -190,7 +190,11 @@ namespace clitk
   template <class InputImageType, class OutputImageType>
   void 
   BackProjectImageFilter<InputImageType, OutputImageType>
+#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 ))
+  ::Initialize( void )
+#else
   ::Initialize( void ) throw (itk::ExceptionObject)
+#endif
   {
     //Change the origin of the 2D input
     typename  InputImageType::ConstPointer inputPtr=this->GetInput();
@@ -223,7 +227,7 @@ namespace clitk
   BackProjectImageFilter<InputImageType, OutputImageType>
   ::CalculateProjectionMatrix( void )
   {
-    InputSpacingType inputSpacing=this->GetInput()->GetSpacing();
+    //InputSpacingType inputSpacing=this->GetInput()->GetSpacing();
     
     // Projection on YZ plane+pixelTrans
     itk::Matrix<double,3,4> temp;
@@ -302,8 +306,7 @@ namespace clitk
   //-----------------------------------------------------------------------
   template <class InputImageType, class OutputImageType>
   void 
-  BackProjectImageFilter<InputImageType, OutputImageType>
-  ::ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId )
+  BackProjectImageFilter<InputImageType, OutputImageType>::ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread,  itk::ThreadIdType threadId )
   {
     //Projection pointer
     InputImageConstPointer inputPtr=this->GetInput();
@@ -325,7 +328,6 @@ namespace clitk
     iPoint.Fill(itk::NumericTraits<double>::Zero);
     OutputIndexType oIndex;
     ContinuousInputIndexType iIndex;
-    InputSizeType inputSize=inputPtr->GetLargestPossibleRegion().GetSize();
 
     //Get the first output coordinate
     oIndex=iterator.GetIndex();//costly but only once a thread