]> Creatis software - clitk.git/blobdiff - itk/clitkBackProjectImageFilter.txx
itkv4 migration use itk::ThreadIdType
[clitk.git] / itk / clitkBackProjectImageFilter.txx
index 0e30a9a1eacc306329d79461b2d70fe83db5c6b2..af78d849f80b1e1e66d9f131ee65dd939708e4d6 100644 (file)
@@ -40,6 +40,8 @@ namespace clitk
     this->m_SourceToAxis = 1000.0;
     this->m_EdgePaddingValue = itk::NumericTraits<OutputPixelType>::Zero;//density images
     this->m_RigidTransformMatrix.SetIdentity();
+    this->m_PanelShift[0] = 0.;
+    this->m_PanelShift[1] = 0.;
 
     //Parameters for output
     this->m_OutputSpacing.Fill(1);
@@ -301,7 +303,7 @@ namespace clitk
   template <class InputImageType, class OutputImageType>
   void 
   BackProjectImageFilter<InputImageType, OutputImageType>
-  ::ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread,  int threadId )
+  ::ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId )
   {
     //Projection pointer
     InputImageConstPointer inputPtr=this->GetInput();
@@ -334,8 +336,8 @@ namespace clitk
        
     //Compute the first input coordinate (invert Y/X)
     homInputPoint= (m_ProjectionMatrix * homOutputPoint);
-    iPoint[0]=-homInputPoint[0]/homInputPoint[2];
-    iPoint[1]=homInputPoint[1]/homInputPoint[2];
+    iPoint[0]=-homInputPoint[0]/homInputPoint[2] + m_PanelShift[0];
+    iPoint[1]=homInputPoint[1]/homInputPoint[2] + m_PanelShift[1];
 
     typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType;
     typename InterpolatorType::Pointer interpolator = InterpolatorType::New();