plastimatch
Loading...
Searching...
No Matches
rt_study.h
Go to the documentation of this file.
1/* -----------------------------------------------------------------------
2 See COPYRIGHT.TXT and LICENSE.TXT for copyright and license information
3 ----------------------------------------------------------------------- */
4#ifndef _rt_study_h_
5#define _rt_study_h_
6
7#include "plmbase_config.h"
8#include <vector>
9#include "itk_image_type.h"
10#include "plm_file_format.h"
11#include "plm_image.h"
12#include "plm_image_type.h"
13#include "rt_study_metadata.h"
14#include "rtplan.h"
15#include "segmentation.h"
16
17class Metadata;
18class Plm_image;
19class Rtplan;
21class Volume;
23
29public:
31public:
33
34public:
35 Rt_study ();
36 ~Rt_study ();
37
38 void load (const char* input_path,
40 void load (const std::string& input_path,
42 void load_dicom_dir (const char *dicom_dir);
43 void load_dicom (const char *dicom_dir);
44 void load_dicom_dose (const char *dicom_path);
45 void load_dicom_rtss (const char *dicom_path);
46 void load_dicom_rtplan(const char *dicom_path);
47 void load_image (const char *fn);
48 void load_image (const std::string& fn);
49 void load_xio (const char *xio_dir);
50 void load_rt_study_dir (const char *rt_study_dir);
51 void load_rt_study_dir (const std::string& rt_study_dir);
52 void load_ss_img (const char *ss_img, const char *ss_list);
53 void load_dose_img (const char *dose_img);
54 void load_dose_xio (const char *dose_xio);
55 void load_dose_astroid (const char *dose_astroid);
56 void load_dose_mc (const char *dose_mc);
57 void load_rdd (const char *image_directory);
58 void load_dcmtk (const char *dicom_dir);
59 void load_gdcm (const char *dicom_dir);
60
61 void load_cxt (const char *input_fn);
62 void load_prefix (const char *input_fn);
63 void load_prefix (const std::string& input_fn);
64
66 void save (const std::string& output_dir);
67
68 void save_dicom (const std::string& output_dir,
69 bool filenames_with_uid = true);
70 void save_dicom (const char *output_dir,
71 bool filenames_with_uid = true);
72 void save_dicom_dose (const char *output_dir);
73
74 void save_image (const std::string& fname);
75 void save_image (const char* fname);
76 void save_image (const char* fname, Plm_image_type image_type);
77
78 void save_dose (const std::string& fname);
79 void save_dose (const char* fname);
80 void save_dose (const char* fname, Plm_image_type image_type);
81
82 void save_prefix (const std::string& output_prefix,
83 const std::string& extension = "mha");
84
86 const Rt_study_metadata::Pointer& get_rt_study_metadata () const;
87 Rt_study_metadata::Pointer& get_rt_study_metadata ();
89 void set_study_metadata (const std::vector<std::string>& metadata);
91 Metadata::Pointer& get_study_metadata ();
93 void set_image_metadata (const std::vector<std::string>& metadata);
95 Metadata::Pointer& get_image_metadata ();
97 void set_dose_metadata (const std::vector<std::string>& metadata);
99 Metadata::Pointer& get_dose_metadata ();
102 void set_rtstruct_metadata (const std::vector<std::string>& metadata);
104 Metadata::Pointer& get_rtstruct_metadata ();
106 void generate_new_study_uids ();
108 void force_ct_series_uid (const std::string& series_uid);
109
110 bool have_image ();
111 void set_image (ShortImageType::Pointer& itk_image);
112 void set_image (FloatImageType::Pointer& itk_image);
113 void set_image (Plm_image* pli);
114 void set_image (const Plm_image::Pointer& pli);
115 Plm_image::Pointer& get_image ();
116
117 bool have_dose ();
118 void set_dose (Plm_image *pli);
119 void set_dose (FloatImageType::Pointer itk_dose);
120 void set_dose (Volume *vol);
121 void set_dose (const Plm_image::Pointer& pli);
122 Plm_image::Pointer get_dose ();
123
124 bool have_segmentation ();
125 Segmentation::Pointer get_segmentation ();
126 void set_segmentation (Segmentation::Pointer seg);
127 void add_structure (
128 const UCharImageType::Pointer& itk_image,
129 const char *structure_name = 0,
130 const char *structure_color = 0);
131
132 bool have_plan ();
133 Rtplan::Pointer& get_plan ();
134
135 const std::string& get_xio_dose_filename () const;
136 Xio_ct_transform* get_xio_ct_transform ();
137
138 Volume::Pointer get_image_volume_short ();
139 Volume::Pointer get_image_volume_float ();
140
141 bool has_dose ();
142 Volume::Pointer get_dose_volume_float ();
143
144 void resample (float spacing[3]);
145
146protected:
147 void save_dcmtk (const char *dicom_dir, bool filenames_with_uid);
148 void save_dcmtk_dose (const char *dicom_dir);
150};
151
152#endif
The Metadata class encapsulate DICOM metadata for a single series. It is implemented as a map from st...
Definition metadata.h:24
The Plm_image class represents a three-dimensional volume. The volume is an abstraction that can co...
Definition plm_image.h:27
std::shared_ptr< Self > Pointer
Definition plm_image.h:29
std::shared_ptr< Self > Pointer
Definition rt_study_metadata.h:29
Definition rt_study_p.h:14
The Rt_study class encapsulates the concept of a radiotherapy planning data set, including image,...
Definition rt_study.h:28
void load_gdcm(const char *dicom_dir)
Rt_study_private * d_ptr
Definition rt_study.h:32
void convert_ss_img_to_cxt()
Definition rtplan.h:20
std::shared_ptr< Self > Pointer
Definition rtplan.h:22
std::shared_ptr< Self > Pointer
Definition segmentation.h:25
The Volume class represents a three-dimensional volume on a uniform grid. The volume can be located a...
Definition volume.h:38
Definition xio_ct_transform.h:13
Plm_file_format
Definition plm_file_format.h:11
@ PLM_FILE_FMT_UNKNOWN
Definition plm_file_format.h:13
Plm_image_type
Definition plm_image_type.h:11
#define PLMBASE_API
Definition plmbase_config.h:19
#define SMART_POINTER_SUPPORT(T)
Definition smart_pointer.h:19