CustusX
22.04-rc5
An IGT application
|
#include <metaimage.hpp>
Public Member Functions | |
MetaImage () | |
~MetaImage () | |
int | getXSize () const |
int | getYSize () const |
double | getXSpacing () const |
double | getYSpacing () const |
int | makehash (const int x, const int y) const |
T * | getPixelPointer () |
const T * | getPixelPointer () const |
void | toImgCoords (double &x, double &y, const double p[3]) const |
Matrix4 | getTransform () |
const Matrix4 & | getTransform () const |
template<typename Dt > | |
void | regionGrow (vector< Dt > &ret, int imgx, int imgy) const |
void | setIdx (int i) |
int | getIdx () const |
bool | inImage (double img_x, double img_y) const |
Static Public Member Functions | |
static vector< MetaImage > * | readImages (const string &prefix) |
A class to represent a MetaImage. This includes reading it and knowing its position in space. Region growing is also done by this class
Definition at line 15 of file metaimage.hpp.
Constructor. Initialize everything to zero
Definition at line 20 of file metaimage.hpp.
Definition at line 31 of file metaimage.hpp.
|
inline |
Get the index of this image
Definition at line 243 of file metaimage.hpp.
|
inline |
Definition at line 84 of file metaimage.hpp.
|
inline |
Definition at line 93 of file metaimage.hpp.
Get the transformation matrix for this image
Definition at line 147 of file metaimage.hpp.
Get the transformation matrix for this image
Definition at line 158 of file metaimage.hpp.
|
inline |
Definition at line 40 of file metaimage.hpp.
|
inline |
Definition at line 57 of file metaimage.hpp.
|
inline |
Definition at line 48 of file metaimage.hpp.
|
inline |
Definition at line 65 of file metaimage.hpp.
|
inline |
Test if a point is inside this image
img_x | x coordinate (pixel space) |
img_y | y coordinate (pixel space) |
Definition at line 363 of file metaimage.hpp.
|
inline |
Map a pixel position to an integer
Definition at line 74 of file metaimage.hpp.
|
inlinestatic |
Factory function to get a bunch of images by reading them from disk.
prefix | The prefix of the file name. File names are assumed to be of the format prefix$NUMBER.mhd |
Definition at line 254 of file metaimage.hpp.
|
inline |
Perform region growing on this image The Dt parameter specifies the data type of the return data (typically double)
ret | The vector in which to store the points found |
imgx | The seed point (in pixel coordinates), X coordinate |
imgy | The seed point (in pixel coordinates), Y coordinate |
Definition at line 171 of file metaimage.hpp.
|
inline |
|
inline |
Transform a point to from world coordinates to pixel coordinates
x | The x coordinate is returned here |
y | The y coordinate is returned here |
p | The point to transform |
Definition at line 105 of file metaimage.hpp.