Closing Issue #97 - Panel offset set on Projected point as well as after inverse transform.

Dependencies on Image and Patient Orientation. Solved with filter knowledge of pCT parameters.
This commit is contained in:
Proton local user
2023-06-06 17:37:49 +02:00
parent a59de4370c
commit 005f42aa55
2 changed files with 33 additions and 0 deletions

View File

@ -168,6 +168,26 @@ int vtkContourTopogramProjectionFilter::RequestData(
pp2[1] -= dProjectionLPSOffset [1];
pp2[2] -= dProjectionLPSOffset [2];
// Workaround to account for PA-LAT HFS-FFS
switch (this->m_ProjectionOrientation) {
case itk::PA:
pp2[0] += dPOffset;
break;
case itk::LAT:
switch (this->m_PatientOrientation) {
case itk::FFS:
pp2[1] += dPOffset;
break;
case itk::HFS:
pp2[1] -= dPOffset;
break;
default:
break;
}
break;
default:
break;
}
// std::cout << ii << " " << pp2[0] << " " << pp2[1] << " " << pp2[2] << std::endl;
PrjPoints->InsertPoint(ii,pp2);

View File

@ -19,6 +19,8 @@
#include "vtkMatrix4x4.h"
#include "vtkTransform.h"
#include "itkMacro.h"
#include "DRTMetaInformation.h"
class VTKFILTERSCORE_EXPORT vtkContourTopogramProjectionFilter :
public vtkPolyDataAlgorithm
@ -37,6 +39,12 @@ public:
vtkGetObjectMacro(m_Transform, vtkTransform);
vtkGetObjectMacro(m_RefTransform, vtkTransform);
itkSetEnumMacro(ProjectionOrientation, itk::tProjOrientationType);
itkGetEnumMacro(ProjectionOrientation, itk::tProjOrientationType);
itkSetEnumMacro(PatientOrientation, itk::tPatOrientation);
itkGetEnumMacro(PatientOrientation, itk::tPatOrientation);
void SetLPStoProjectionLPSGeometryOffset (const double * );
void SetSCD(const double dVal);
void SetImportOffsetLPS(const double *);
@ -52,6 +60,11 @@ protected:
vtkInformationVector* outputVector) override;
int FillInputPortInformation(int port, vtkInformation* info) override;
itk::tProjOrientationType
m_ProjectionOrientation;
itk::tPatOrientation
m_PatientOrientation;
private:
vtkContourTopogramProjectionFilter (const vtkContourTopogramProjectionFilter &) = delete;