mirror of
https://gitlab.ethz.ch/gfattori/glocalize.git
synced 2026-05-11 09:25:36 +02:00
107 lines
2.4 KiB
C++
107 lines
2.4 KiB
C++
|
|
//FUNCTION DECLARATION NECESSARY FOR COPY/PASTE FROM vtkGDCMImageReader
|
|
// const char *gGetStringValueFromTag(const gdcm::Tag& t, const gdcm::DataSet& ds);
|
|
|
|
#ifndef DICOMUTILITIES
|
|
#define DICOMUTILITIES
|
|
//gdcm
|
|
#include <gdcmReader.h>
|
|
#include <gdcmAttribute.h>
|
|
#include <gdcmDirectory.h>
|
|
#include <gdcmScanner.h>
|
|
#include <iostream>
|
|
|
|
#include <array>
|
|
#include <memory>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
// Avoid `using namespace` in headers; keep symbols qualified.
|
|
|
|
#define MAXSTRINGLENGHT 255
|
|
#define BADVALUE -9999
|
|
|
|
enum{
|
|
RTPLAN,
|
|
RTSTRUCT,
|
|
IMAGE,
|
|
NODCMFILE
|
|
};
|
|
|
|
// Legacy helper: returns a pointer to an internal static buffer.
|
|
// Prefer gGetStringValueFromTagStr() in new code.
|
|
const char *gGetStringValueFromTag(const gdcm::Tag& t, const gdcm::DataSet& ds);
|
|
std::string gGetStringValueFromTagStr(const gdcm::Tag& t, const gdcm::DataSet& ds);
|
|
const char * gCheckDICOMModality(const char *filename);
|
|
int gCheckDICOMModalityToInt(const char *filename);
|
|
|
|
|
|
class IonBeamProperties{
|
|
public:
|
|
IonBeamProperties();
|
|
|
|
~IonBeamProperties() = default;
|
|
|
|
int BeamNumber;
|
|
std::string BeamName;
|
|
std::string SupportType;
|
|
std::string SupportId;
|
|
int GantryAngle;
|
|
std::array<double, 3> IsocenterPosition;
|
|
float TableYawAngle;
|
|
float TablePitchAngle;
|
|
float TableRollAngle;
|
|
float TableLatDispl;
|
|
float TableLongDispl;
|
|
float TableVertDispl;
|
|
|
|
void PrintSelf();
|
|
};
|
|
|
|
/*-----*/
|
|
//CLASS gIonBEAMProperties
|
|
class RTPlan
|
|
{
|
|
public:
|
|
std::string PatientName;
|
|
std::string PatientID;
|
|
std::string PatientSex;
|
|
std::string PatientAge;
|
|
std::string PatientBirthDate;
|
|
std::string SeriesNumber;
|
|
std::string SeriesDescription;
|
|
std::string StudyID;
|
|
std::string StudyDescription;
|
|
std::string Modality;
|
|
|
|
std::array<double, 3> IsocenterPosition;
|
|
std::array<double, 3> VolumeCenter;
|
|
int BeamNumber;
|
|
std::string BeamName;
|
|
double TableRollAngle;
|
|
double TableYawAngle;
|
|
double TablePitchAngle;
|
|
double TableLatDispl;
|
|
double TableVertDispl;
|
|
double TableLongDispl;
|
|
std::string SupportType;
|
|
std::string SupportId;
|
|
std::string PatientOrientation;
|
|
int NumberOfBeams;
|
|
|
|
// Owns all beams.
|
|
std::vector<std::unique_ptr<IonBeamProperties>> Beams;
|
|
|
|
// Last error message set by fillRTPlan() when it returns false.
|
|
std::string LastError;
|
|
|
|
|
|
~RTPlan() = default;
|
|
|
|
RTPlan();
|
|
void PrintSelf();
|
|
|
|
bool fillRTPlan(const char *filertionplan);
|
|
};
|
|
|
|
#endif |