plastimatch
Loading...
Searching...
No Matches
proj_volume.h
Go to the documentation of this file.
1/* -----------------------------------------------------------------------
2 See COPYRIGHT.TXT and LICENSE.TXT for copyright and license information
3 ----------------------------------------------------------------------- */
4#ifndef _proj_volume_h_
5#define _proj_volume_h_
6
7#include "plmbase_config.h"
8#include <string>
9#include "plm_int.h"
10
11class Proj_matrix;
12class Proj_volume_private;
13class Volume;
14
22{
23public:
24 Proj_volume ();
25 ~Proj_volume ();
26public:
27 Proj_volume_private *d_ptr;
28public:
29 void set_geometry (
30 const double src[3], // position of source (mm)
31 const double iso[3], // position of isocenter (mm)
32 const double vup[3], // dir to "top" of projection plane
33 double sid, // dist from proj plane to source (mm)
34 const plm_long image_dim[2], // resolution of image
35 const double image_center[2], // image center (pixels)
36 const double image_spacing[2], // pixel size (mm)
37 const double clipping_dist[2], // dist from src to clipping planes (mm)
38 const double step_length // spacing between planes
39 );
40 void set_clipping_dist (const double clipping_dist[2]);
41 const plm_long* get_image_dim ();
42 plm_long get_image_dim (int dim);
43 plm_long get_num_steps ();
44 const double* get_incr_c ();
45 const double* get_incr_r ();
46 Proj_matrix *get_proj_matrix ();
47 const double* get_nrm ();
48 const double* get_src () const;
49 const double* get_iso ();
50 const double* get_clipping_dist();
51 double get_step_length () const;
52 const double* get_ul_room ();
53 Volume *get_vol ();
54 const Volume *get_vol () const;
55
56 void allocate ();
57
58 void save_img (const char* filename);
59 void save_img (const std::string& filename);
60 void save_header (const char* filename);
61 void save_header (const std::string& filename);
62 void save_projv (const char* filename);
63 void save_projv (const std::string& filename);
64 void load_img (const char* filename);
65 void load_img (const std::string& filename);
66 void load_header (const char* filename);
67 void load_header (const std::string& filename);
68 void load_projv (const char* filename);
69 void load_projv (const std::string& filename);
70
71 /* Project 3D coordinate xyz of cartesian space
72 into 2D coordinate ij coordinate on projection plane.
73 In this version, the inputs and outputs are homogenous,
74 not cartesian. */
75 void project_h (double* ij, const double* xyz) const;
76 /* Project 3D coordinate xyz of cartesian space
77 into 2D coordinate ij coordinate on projection plane.
78 In this version, the inputs and outputs are cartesian,
79 not homogenous. */
80 void project (double* ij, const double* xyz) const;
81
82 void debug ();
83};
84
85#endif
Definition proj_matrix.h:10
The Proj_volume class represents a three-dimensional volume on a uniform non-orthogonal grid....
Definition proj_volume.h:22
Proj_volume_private * d_ptr
Definition proj_volume.h:27
The Volume class represents a three-dimensional volume on a uniform grid. The volume can be located a...
Definition volume.h:38
#define PLMBASE_API
Definition plmbase_config.h:19