X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FclitkBackProjectImageFilter.txx;h=c07033602c188e1075bd931bf69991727f25083b;hb=80ddaed8a2022748b22a8d2bb85371e4502408db;hp=0e30a9a1eacc306329d79461b2d70fe83db5c6b2;hpb=d001aac0fb0acac8732327f3a73d9d498284a176;p=clitk.git diff --git a/itk/clitkBackProjectImageFilter.txx b/itk/clitkBackProjectImageFilter.txx index 0e30a9a..c070336 100644 --- a/itk/clitkBackProjectImageFilter.txx +++ b/itk/clitkBackProjectImageFilter.txx @@ -40,6 +40,8 @@ namespace clitk this->m_SourceToAxis = 1000.0; this->m_EdgePaddingValue = itk::NumericTraits::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); @@ -221,7 +223,7 @@ namespace clitk BackProjectImageFilter ::CalculateProjectionMatrix( void ) { - InputSpacingType inputSpacing=this->GetInput()->GetSpacing(); + //InputSpacingType inputSpacing=this->GetInput()->GetSpacing(); // Projection on YZ plane+pixelTrans itk::Matrix temp; @@ -323,7 +325,6 @@ namespace clitk iPoint.Fill(itk::NumericTraits::Zero); OutputIndexType oIndex; ContinuousInputIndexType iIndex; - InputSizeType inputSize=inputPtr->GetLargestPossibleRegion().GetSize(); //Get the first output coordinate oIndex=iterator.GetIndex();//costly but only once a thread @@ -334,8 +335,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();