STIR  6.2.0
GenerateImage.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2003-2011, Hammersmith Imanet Ltd
5  Copyright (C) 2018-2022, University College London
6  This file is part of STIR.
7 
8  SPDX-License-Identifier: Apache-2.0
9 
10  See STIR/LICENSE.txt for details
11 */
104 #include "stir/Shape/Shape3D.h"
105 #include "stir/PatientPosition.h"
106 #include "stir/ImagingModality.h"
107 #include "stir/KeyParser.h"
108 #include "stir/is_null_ptr.h"
110 #include "stir/IndexRange3D.h"
111 #include "stir/Succeeded.h"
114 #include <iostream>
115 
116 #ifndef __stir_Shape_GenerateImage_h__
117 # define __stir_Shape_GenerateImage_h__
118 
119 START_NAMESPACE_STIR
120 
121 class GenerateImage : public KeyParser
122 {
123 public:
125  explicit GenerateImage(const char* const par_filename);
126 
128  Succeeded compute();
129 
131  Succeeded save_image();
132 
134  shared_ptr<DiscretisedDensity<3, float>> get_output_sptr();
135 
136 private:
137  virtual void set_defaults();
138  virtual void initialise_keymap();
139  bool post_processing() override;
140  void set_imaging_modality();
141  shared_ptr<ExamInfo> exam_info_sptr;
142  std::string imaging_modality_as_string;
143  ASCIIlist_type patient_orientation_values;
144  ASCIIlist_type patient_rotation_values;
145  int patient_orientation_index;
146  int patient_rotation_index;
147 
148  shared_ptr<DiscretisedDensity<3, float>> out_density_ptr;
149 
150  std::vector<shared_ptr<Shape3D>> shape_ptrs;
151  shared_ptr<Shape3D> current_shape_ptr;
152  std::vector<float> values;
153  float current_value;
154  std::string output_filename;
155  shared_ptr<OutputFileFormat<DiscretisedDensity<3, float>>> output_file_format_sptr;
156 
157  void increment_current_shape_num();
158 
159  int output_image_size_x;
160  int output_image_size_y;
161  int output_image_size_z;
162  float output_voxel_size_x;
163  float output_voxel_size_y;
164  float output_voxel_size_z;
165 
166  CartesianCoordinate3D<int> num_samples;
167 
168  double image_duration;
169  double rel_start_time;
170 };
171 
172 END_NAMESPACE_STIR
173 
174 #endif // __stir_Shape_GenerateImage_h__
Declaration of class stir::Succeeded.
Declaration of class stir::PatientPosition.
Declaration of class stir::KeyParser.
This file declares the class stir::IndexRange3D.
Declaration of class stir::ImagingModality.
Declaration of class stir::OutputFileFormat.
Declaration of class stir::Shape3D.
Definition of stir::is_null_ptr functions.
defines the stir::VoxelsOnCartesianGrid class
defines the stir::CartesianCoordinate3D<coordT> class