X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkConeBeamProjectImageFilter.txx;h=798fbd1c5bd10b83e5d5b8994ef8da36bf62e7e3;hb=06dc48f17ea8545df56511ca1537a546b161a164;hp=173411f5531be7b8bd2057beaaecfb5a5a9d407b;hpb=a26cd8a19e1b9ad8344ab501436045f171a73713;p=clitk.git diff --git a/tools/clitkConeBeamProjectImageFilter.txx b/tools/clitkConeBeamProjectImageFilter.txx old mode 100755 new mode 100644 index 173411f..798fbd1 --- a/tools/clitkConeBeamProjectImageFilter.txx +++ b/tools/clitkConeBeamProjectImageFilter.txx @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #ifndef __clitkConeBeamProjectImageFilter_txx #define __clitkConeBeamProjectImageFilter_txx namespace clitk @@ -36,6 +36,8 @@ namespace clitk m_IsoCenter.Fill(0.0); m_SourceToScreen=1536.; m_SourceToAxis=1000.; + m_PanelShift[0] = 0.; + m_PanelShift[1] = 0.; m_ProjectionAngle=0.; m_RigidTransformMatrix.SetIdentity(); m_EdgePaddingValue=itk::NumericTraits::Zero;//density images @@ -114,7 +116,7 @@ namespace clitk itk::Matrix centeredRotationMatrix = GetCenteredRotationMatrix3D(rotationParameters,transformedCenter); // Compose this rotation with the rigid transform matrix - itk::Matrix finalTransform = centeredRotationMatrix * m_RigidTransformMatrix; + itk::Matrix finalTransform = m_RigidTransformMatrix * centeredRotationMatrix ; // Set the rotation itk::Matrix finalRotation = GetRotationalPartMatrix3D(finalTransform); @@ -163,14 +165,15 @@ namespace clitk spacingOutput[1] = m_OutputSpacing[0]; // pixel spacing along Y of the 2D DRR image [mm] spacingOutput[2] = m_OutputSpacing[1]; // pixel spacing along Y of the 2D DRR image [mm] m_Resampler->SetOutputSpacing( spacingOutput ); - if (m_Verbose)std::cout<<"The output size is "<< m_OutputSpacing <<"..."<< std::endl; + if (m_Verbose)std::cout<<"The output spacing is "<< m_OutputSpacing <<"..."<< std::endl; // The position of the DRR is specified, we presume that for an angle of 0° the flatpanel is located at the negative x-axis // JV -1 seems to correspond better with shearwarp of Simon Rit typename InterpolatorType::InputPointType originOutput; originOutput[0] = m_IsoCenter[0]- (m_SourceToScreen - m_SourceToAxis); - originOutput[1] = m_IsoCenter[1]-static_cast(sizeOuput[1]-1)*spacingOutput[1]/2.0; - originOutput[2] = m_IsoCenter[2]-static_cast(sizeOuput[2]-1)*spacingOutput[2]/2.0; + DD(m_PanelShift); + originOutput[1] = m_IsoCenter[1]-static_cast(sizeOuput[1]-1)*spacingOutput[1]/2.0 - m_PanelShift[0]; + originOutput[2] = m_IsoCenter[2]-static_cast(sizeOuput[2]-1)*spacingOutput[2]/2.0 - m_PanelShift[1]; m_Resampler->SetOutputOrigin( originOutput ); if (m_Verbose)std::cout<<"The origin of the flat panel is at "<< originOutput <<",..."<< std::endl;