Skip to content

Commit

Permalink
Fixed a small bug that caused inconsistency in the image corner calcu…
Browse files Browse the repository at this point in the history
…tation --> this also fixes the reconstruction artefact issue
  • Loading branch information
GabrieleBelotti committed Jan 30, 2020
1 parent 483b30c commit 1a20fb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/rtkDisplacedDetectorImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ DisplacedDetectorImageFilter<TInputImage, TOutputImage>::GenerateOutputInformati
m_InferiorCorner = corner[0];
m_SuperiorCorner = m_InferiorCorner;
if (inputPtr->GetSpacing()[0] < 0.)
m_InferiorCorner += inputPtr->GetSpacing()[0] * (outputLargestPossibleRegion.GetSize(0) - 1);
m_InferiorCorner += inputPtr->GetSpacing()[0] * (outputLargestPossibleRegion.GetSize(0));
else
m_SuperiorCorner += inputPtr->GetSpacing()[0] * (outputLargestPossibleRegion.GetSize(0) - 1);
m_SuperiorCorner += inputPtr->GetSpacing()[0] * (outputLargestPossibleRegion.GetSize(0));

if (!m_OffsetsSet)
{
Expand Down

0 comments on commit 1a20fb4

Please sign in to comment.