plastimatch
Loading...
Searching...
No Matches
volume_header.h
Go to the documentation of this file.
1/* -----------------------------------------------------------------------
2 See COPYRIGHT.TXT and LICENSE.TXT for copyright and license information
3 ----------------------------------------------------------------------- */
4#ifndef _volume_header_h_
5#define _volume_header_h_
6
7#include "plmbase_config.h"
8#include "direction_cosines.h"
9#include "plm_image.h"
10#include "volume.h"
11
12class Bspline_xform;
14class Volume;
15class Volume_header_private;
16
18public:
19 Volume_header_private *d_ptr;
20
21public:
23 Volume_header (plm_long dim[3], float origin[3], float spacing[3]);
24 Volume_header (plm_long dim[3], float origin[3], float spacing[3],
25 float direction_cosines[9]);
27 Volume_header (const Volume::Pointer& vol);
31
32public:
33 void set_dim (const plm_long dim[3]);
34 plm_long* get_dim ();
35 const plm_long* get_dim () const;
36
37 void set_origin (const float origin[3]);
38 void get_origin (float origin[3]);
39 float* get_origin ();
40 const float* get_origin () const;
41
42 void set_spacing (const float spacing[3]);
43 float* get_spacing ();
44 const float* get_spacing () const;
45
46 void set_direction_cosines (const float direction_cosines[9]);
51 const float * get_direction_cosines_matrix () const;
52
53 void set (const plm_long dim[3], const float origin[3],
54 const float spacing[3], const float dc[9]);
55 void set (const plm_long dim[3], const float origin[3],
56 const float spacing[3], const Direction_cosines& dc);
57 void set (const Plm_image_header* img);
58 void set_from_bxf (Bspline_xform *bxf);
59
60public:
61 void clone (const Volume_header *src);
62 static void clone (Volume_header *dest, Volume_header *src);
63
64public:
65 void get_image_center (float center[3]);
66 void print (void) const;
67
68public:
69 /* Return 1 if the two headers are the same */
70 static int compare (Volume_header *pli1, Volume_header *pli2);
71};
72
73#endif
The Bspline_xform class encapsulates the B-spline coefficients used by native registration and warpin...
Definition bspline_xform.h:24
Definition direction_cosines.h:23
The Plm_image_header class defines the geometry of an image. It defines image origin,...
Definition plm_image_header.h:24
std::shared_ptr< Self > Pointer
Definition plm_image.h:29
Volume_header()
Definition volume_header.cxx:31
Direction_cosines & get_direction_cosines()
Definition volume_header.cxx:179
void set_from_bxf(Bspline_xform *bxf)
Definition volume_header.cxx:232
void clone(const Volume_header *src)
Definition volume_header.cxx:249
plm_long * get_dim()
Definition volume_header.cxx:101
void set_origin(const float origin[3])
Definition volume_header.cxx:113
void get_origin(float origin[3])
Definition volume_header.cxx:121
void get_image_center(float center[3])
Definition volume_header.cxx:256
void set_spacing(const float spacing[3])
Definition volume_header.cxx:141
void set(const plm_long dim[3], const float origin[3], const float spacing[3], const float dc[9])
Definition volume_header.cxx:197
void set_direction_cosines_identity()
Definition volume_header.cxx:173
float * get_spacing()
Definition volume_header.cxx:149
const float * get_direction_cosines_matrix() const
Definition volume_header.cxx:191
void set_direction_cosines(const float direction_cosines[9])
Definition volume_header.cxx:161
Volume_header_private * d_ptr
Definition volume_header.h:19
void print(void) const
Definition volume_header.cxx:268
void set_dim(const plm_long dim[3])
Definition volume_header.cxx:93
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
int compare(const void *a, const void *b)
Definition simplify_points.cxx:19