Skip to content

Commit

Permalink
ENH: Basic JSON descriptor file works for Varian TrueBeam STX
Browse files Browse the repository at this point in the history
  • Loading branch information
cpinter committed Feb 11, 2023
1 parent 8fcd31d commit ac9c57b
Show file tree
Hide file tree
Showing 11 changed files with 578 additions and 401 deletions.
1 change: 1 addition & 0 deletions RoomsEyeView/Logic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set(${KIT}_INCLUDE_DIRECTORIES
${vtkSlicerSubjectHierarchyModuleLogic_INCLUDE_DIRS}
${vtkSlicerBeamsModuleMRML_INCLUDE_DIRS}
${vtkSlicerBeamsModuleLogic_INCLUDE_DIRS}
${RapidJSON_INCLUDE_DIR}
)

set(${KIT}_SRCS
Expand Down
12 changes: 6 additions & 6 deletions RoomsEyeView/Logic/vtkMRMLRoomsEyeViewNode.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ vtkMRMLNodeNewMacro(vtkMRMLRoomsEyeViewNode);
//----------------------------------------------------------------------------
vtkMRMLRoomsEyeViewNode::vtkMRMLRoomsEyeViewNode()
: PatientBodySegmentID(nullptr)
, TreatmentMachineType(nullptr)
, TreatmentMachineDescriptorFilePath(nullptr)
, CollisionDetectionEnabled(true)
, GantryRotationAngle(0.0)
, CollimatorRotationAngle(0.0)
Expand All @@ -93,7 +93,7 @@ vtkMRMLRoomsEyeViewNode::vtkMRMLRoomsEyeViewNode()
vtkMRMLRoomsEyeViewNode::~vtkMRMLRoomsEyeViewNode()
{
this->SetPatientBodySegmentID(nullptr);
this->SetTreatmentMachineType(nullptr);
this->SetTreatmentMachineDescriptorFilePath(nullptr);
}

//----------------------------------------------------------------------------
Expand All @@ -115,7 +115,7 @@ void vtkMRMLRoomsEyeViewNode::WriteXML(ostream& of, int nIndent)
vtkMRMLWriteXMLFloatMacro(AdditionalModelLongitudinalDisplacement, AdditionalModelLongitudinalDisplacement);
vtkMRMLWriteXMLFloatMacro(AdditionalModelLateralDisplacement, AdditionalModelLateralDisplacement);
vtkMRMLWriteXMLStringMacro(PatientBodySegmentID, PatientBodySegmentID);
vtkMRMLWriteXMLStringMacro(TreatmentMachineType, TreatmentMachineType);
vtkMRMLWriteXMLStringMacro(TreatmentMachineDescriptorFilePath, TreatmentMachineDescriptorFilePath);
vtkMRMLWriteXMLIntMacro(ApplicatorHolderVisibility, ApplicatorHolderVisibility);
vtkMRMLWriteXMLIntMacro(ElectronApplicatorVisibility, ElectronApplicatorVisibility);
vtkMRMLWriteXMLEndMacro();
Expand All @@ -140,7 +140,7 @@ void vtkMRMLRoomsEyeViewNode::ReadXMLAttributes(const char** atts)
vtkMRMLReadXMLFloatMacro(AdditionalModelLongitudinalDisplacement, AdditionalModelLongitudinalDisplacement);
vtkMRMLReadXMLFloatMacro(AdditionalModelLateralDisplacement, AdditionalModelLateralDisplacement);
vtkMRMLReadXMLStringMacro(PatientBodySegmentID, PatientBodySegmentID);
vtkMRMLReadXMLStringMacro(TreatmentMachineType, TreatmentMachineType);
vtkMRMLReadXMLStringMacro(TreatmentMachineDescriptorFilePath, TreatmentMachineDescriptorFilePath);
vtkMRMLReadXMLIntMacro(ApplicatorHolderVisibility, ApplicatorHolderVisibility);
vtkMRMLReadXMLIntMacro(ElectronApplicatorVisibility, ElectronApplicatorVisibility);
vtkMRMLReadXMLEndMacro();
Expand Down Expand Up @@ -172,7 +172,7 @@ void vtkMRMLRoomsEyeViewNode::Copy(vtkMRMLNode *anode)
vtkMRMLCopyFloatMacro(AdditionalModelLongitudinalDisplacement);
vtkMRMLCopyFloatMacro(AdditionalModelLateralDisplacement);
vtkMRMLCopyStringMacro(PatientBodySegmentID);
vtkMRMLCopyStringMacro(TreatmentMachineType);
vtkMRMLCopyStringMacro(TreatmentMachineDescriptorFilePath);
vtkMRMLCopyIntMacro(ApplicatorHolderVisibility);
vtkMRMLCopyIntMacro(ElectronApplicatorVisibility);
vtkMRMLCopyEndMacro();
Expand All @@ -198,7 +198,7 @@ void vtkMRMLRoomsEyeViewNode::PrintSelf(ostream& os, vtkIndent indent)
vtkMRMLPrintFloatMacro(AdditionalModelLongitudinalDisplacement);
vtkMRMLPrintFloatMacro(AdditionalModelLateralDisplacement);
vtkMRMLPrintStringMacro(PatientBodySegmentID);
vtkMRMLPrintStringMacro(TreatmentMachineType);
vtkMRMLPrintStringMacro(TreatmentMachineDescriptorFilePath);
vtkMRMLPrintIntMacro(ApplicatorHolderVisibility);
vtkMRMLPrintIntMacro(ElectronApplicatorVisibility);
vtkMRMLPrintEndMacro();
Expand Down
12 changes: 6 additions & 6 deletions RoomsEyeView/Logic/vtkMRMLRoomsEyeViewNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ class VTK_SLICER_ROOMSEYEVIEW_LOGIC_EXPORT vtkMRMLRoomsEyeViewNode : public vtkM
/// Set patient body segment ID
vtkSetStringMacro(PatientBodySegmentID);

/// Get treatment machine type name
vtkGetStringMacro(TreatmentMachineType);
/// Set treatment machine type name
vtkSetStringMacro(TreatmentMachineType);
/// Get path to the treatment machine descriptor JSON file
vtkGetStringMacro(TreatmentMachineDescriptorFilePath);
/// Set path to the treatment machine descriptor JSON file
vtkSetStringMacro(TreatmentMachineDescriptorFilePath);

vtkGetMacro(CollisionDetectionEnabled, bool);
vtkSetMacro(CollisionDetectionEnabled, bool);
Expand Down Expand Up @@ -182,8 +182,8 @@ class VTK_SLICER_ROOMSEYEVIEW_LOGIC_EXPORT vtkMRMLRoomsEyeViewNode : public vtkM
/// Patient body segment ID in selected segmentation node
char* PatientBodySegmentID;

/// Name of treatment machine used (must match folder name where the models can be found)
char* TreatmentMachineType;
/// Path to the treatment machine descriptor JSON file
char* TreatmentMachineDescriptorFilePath;

bool CollisionDetectionEnabled;

Expand Down
Loading

0 comments on commit ac9c57b

Please sign in to comment.