- Add it in the filter.
- Modify the ggo and generic filter to handle it.
option "spacing" - "Spacing for the output image" double multiple no default="0.8"
option "panel_position" - "Approximate position of the panel: small, medium or large" string no default="small"
-option "panel_shift" - "Precise position of the panel in mm" double no
+option "panel_shift" - "Precise position of the panel in mm" double multiple no
}
/** Set the panelshift. */
- void SetPanelShift(double shift)
+ void SetPanelShift(double x, double y)
{
- if (m_PanelShift!=shift)
+ if (m_PanelShift[0] != x)
{
- m_PanelShift=shift;
+ m_PanelShift[0] = x;
+ m_IsInitialized=false;
+ }
+ if (m_PanelShift[1] != y)
+ {
+ m_PanelShift[1] = y;
m_IsInitialized=false;
}
}
double m_SourceToScreen;
double m_SourceToAxis;
double m_ProjectionAngle;
- double m_PanelShift;
+ double m_PanelShift[2];
MatrixType m_RigidTransformMatrix;
OutputPixelType m_EdgePaddingValue;
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<OutputPixelType>::Zero;//density images
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);
DD(m_PanelShift);
- originOutput[1] = m_IsoCenter[1]-static_cast<double>(sizeOuput[1]-1)*spacingOutput[1]/2.0 - m_PanelShift;
- originOutput[2] = m_IsoCenter[2]-static_cast<double>(sizeOuput[2]-1)*spacingOutput[2]/2.0;
+ originOutput[1] = m_IsoCenter[1]-static_cast<double>(sizeOuput[1]-1)*spacingOutput[1]/2.0 - m_PanelShift[0];
+ originOutput[2] = m_IsoCenter[2]-static_cast<double>(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;
DD(m_ArgsInfo.panel_position_arg);
if (m_ArgsInfo.panel_shift_given) // one should read the specific values for each angle in Frame.dbf
- filter->SetPanelShift(m_ArgsInfo.panel_shift_arg);
+ filter->SetPanelShift(m_ArgsInfo.panel_shift_arg[0], m_ArgsInfo.panel_shift_arg[1]);
else { // approximate panel positions hard coded values for the elekta synergy
if (strcmp(m_ArgsInfo.panel_position_arg,"small") ==0)
- filter->SetPanelShift(0.);
+ filter->SetPanelShift(0., 0.);
else if (strcmp(m_ArgsInfo.panel_position_arg,"medium") ==0)
- filter->SetPanelShift(114.84);
+ filter->SetPanelShift(114.84, 0.); // VD : 120 , 0 ?
else if (strcmp(m_ArgsInfo.panel_position_arg,"large") ==0)
- filter->SetPanelShift(190.);
+ filter->SetPanelShift(190., 0.);
else assert(false); //Unsupported panel position
}
// Output image info