summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d001aac)
Handle panel shift in x and y direction to generate back projected
images.
+ void SetPanelShift(double x, double y)
+ {
+ m_PanelShift[0] = x;
+ m_PanelShift[1] = y;
+ }
// itkSetMacro(IsoCenter, OutputPointType);
// itkGetConstReferenceMacro(IsoCenter, OutputPointType)
// itkSetMacro( SourceToScreen, double );
// itkSetMacro(IsoCenter, OutputPointType);
// itkGetConstReferenceMacro(IsoCenter, OutputPointType)
// itkSetMacro( SourceToScreen, double );
double m_SourceToAxis;
OutputPixelType m_EdgePaddingValue;
double m_ProjectionAngle;
double m_SourceToAxis;
OutputPixelType m_EdgePaddingValue;
double m_ProjectionAngle;
+ double m_PanelShift[2];
// Output image info
OutputSizeType m_OutputSize; // Size of the output image
// Output image info
OutputSizeType m_OutputSize; // Size of the output image
this->m_SourceToAxis = 1000.0;
this->m_EdgePaddingValue = itk::NumericTraits<OutputPixelType>::Zero;//density images
this->m_RigidTransformMatrix.SetIdentity();
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);
//Parameters for output
this->m_OutputSpacing.Fill(1);
//Compute the first input coordinate (invert Y/X)
homInputPoint= (m_ProjectionMatrix * homOutputPoint);
//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();
typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType;
typename InterpolatorType::Pointer interpolator = InterpolatorType::New();