plastimatch
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Plm_image Class Reference

The Plm_image class represents a three-dimensional volume.
The volume is an abstraction that can contain a volume in either native format (Volume), or ITK format (itk::Image), in any type (unsigned char, float, etc.), or in several commonly used extensions () More...

#include <plm_image.h>

Public Member Functions

 SMART_POINTER_SUPPORT (Plm_image)
 
 Plm_image ()
 
 Plm_image (const char *fname)
 
 Plm_image (const std::string &fname)
 
 Plm_image (const char *fname, Plm_image_type type)
 
 Plm_image (const std::string &fname, Plm_image_type type)
 
 Plm_image (UCharImageType::Pointer img)
 
 Plm_image (CharImageType::Pointer img)
 
 Plm_image (ShortImageType::Pointer img)
 
 Plm_image (FloatImageType::Pointer img)
 
 Plm_image (const Volume::Pointer &vol)
 
 Plm_image (Volume *vol)
 
 Plm_image (Plm_image_type type, const Plm_image_header &pih)
 
 ~Plm_image ()
 
void init ()
 
void free ()
 
bool have_image ()
 
Plm_image::Pointer clone (void)
 
void create (Plm_image_type type, const Plm_image_header &pih)
 
bool load (const char *fname, Plm_image_type type)
 
bool load (const std::string &fname, Plm_image_type type)
 
bool load_native (const char *fname)
 
bool load_native (const std::string &fn)
 
bool load_native_dicom (const char *fname)
 
bool load_native_nki (const char *fname)
 
void save_image (const char *fname)
 
void save_image (const std::string &fname)
 
void convert_and_save (const char *fname, Plm_image_type new_type)
 
void convert_and_save (const std::string &fname, Plm_image_type new_type)
 
void set (const Plm_image::Pointer &pli)
 
void set_volume (const Volume::Pointer &v, Plm_image_type type)
 
void set_volume (const Volume::Pointer &v)
 
void set_volume (Volume *v, Plm_image_type type)
 
void set_volume (Volume *v)
 
void set_itk (UCharImageType::Pointer img)
 
void set_itk (CharImageType::Pointer img)
 
void set_itk (UShortImageType::Pointer img)
 
void set_itk (ShortImageType::Pointer img)
 
void set_itk (UInt32ImageType::Pointer img)
 
void set_itk (Int32ImageType::Pointer img)
 
void set_itk (FloatImageType::Pointer img)
 
void set_itk (DoubleImageType::Pointer img)
 
void set_itk (UCharVecImageType::Pointer img)
 
UCharImageType::Pointer & itk_uchar ()
 
ShortImageType::Pointer & itk_short ()
 
UShortImageType::Pointer & itk_ushort ()
 
FloatImageType::Pointer & itk_float ()
 
UCharVecImageType::Pointer & itk_uchar_vec ()
 
Volume::Pointer & get_volume ()
 
Volume::Pointer & get_volume_uchar ()
 
Volume::Pointer & get_volume_short ()
 
Volume::Pointer & get_volume_float ()
 
Volume::Pointer & get_volume_uchar_vec ()
 
Volumeget_vol ()
 
const Volumeget_vol () const
 
void convert (Plm_image_type new_type)
 
void convert_to_original_type (void)
 
void convert_to_itk (void)
 
void convert_to_itk_float_field (void)
 
void convert_to_itk_uchar_vec (void)
 
int planes ()
 
size_t dim (size_t)
 
float origin (size_t)
 
float spacing (size_t)
 
void set_header (const Plm_image_header *)
 
void set_header (const Plm_image_header &)
 
void print ()
 

Static Public Member Functions

static int compare_headers (const Plm_image::Pointer &pli1, const Plm_image::Pointer &pli2)
 
static Plm_image::Pointer clone (const Plm_image::Pointer &pli)
 

Public Attributes

Plm_image_privated_ptr
 
Plm_image_type m_original_type
 
Plm_image_type m_type
 
UCharImageType::Pointer m_itk_uchar
 
CharImageType::Pointer m_itk_char
 
UShortImageType::Pointer m_itk_ushort
 
ShortImageType::Pointer m_itk_short
 
UInt32ImageType::Pointer m_itk_uint32
 
Int32ImageType::Pointer m_itk_int32
 
UInt64ImageType::Pointer m_itk_uint64
 
Int64ImageType::Pointer m_itk_int64
 
FloatImageType::Pointer m_itk_float
 
DoubleImageType::Pointer m_itk_double
 
UCharVecImageType::Pointer m_itk_uchar_vec
 

Protected Member Functions

void free_volume ()
 
void convert_itk_uchar_to_itk_uchar_vec ()
 
void convert_itk_uint32_to_itk_uchar_vec ()
 
void convert_gpuit_uint32_to_itk_uchar_vec ()
 
void convert_gpuit_uchar_vec_to_itk_uchar_vec ()
 
void convert_itk_uchar_vec_to_gpuit_uchar_vec ()
 
template<class T , class U >
convert_gpuit_to_itk (Volume *vol)
 
template<class T , class U >
void convert_itk_to_gpuit (T img)
 

Detailed Description

The Plm_image class represents a three-dimensional volume.
The volume is an abstraction that can contain a volume in either native format (Volume), or ITK format (itk::Image), in any type (unsigned char, float, etc.), or in several commonly used extensions ()

Constructor & Destructor Documentation

◆ Plm_image() [1/12]

Plm_image::Plm_image ( )

◆ Plm_image() [2/12]

Plm_image::Plm_image ( const char *  fname)

◆ Plm_image() [3/12]

Plm_image::Plm_image ( const std::string &  fname)

◆ Plm_image() [4/12]

Plm_image::Plm_image ( const char *  fname,
Plm_image_type  type 
)

◆ Plm_image() [5/12]

Plm_image::Plm_image ( const std::string &  fname,
Plm_image_type  type 
)

◆ Plm_image() [6/12]

Plm_image::Plm_image ( UCharImageType::Pointer  img)

◆ Plm_image() [7/12]

Plm_image::Plm_image ( CharImageType::Pointer  img)

◆ Plm_image() [8/12]

Plm_image::Plm_image ( ShortImageType::Pointer  img)

◆ Plm_image() [9/12]

Plm_image::Plm_image ( FloatImageType::Pointer  img)

◆ Plm_image() [10/12]

Plm_image::Plm_image ( const Volume::Pointer &  vol)

◆ Plm_image() [11/12]

Plm_image::Plm_image ( Volume vol)

◆ Plm_image() [12/12]

Plm_image::Plm_image ( Plm_image_type  type,
const Plm_image_header pih 
)

◆ ~Plm_image()

Plm_image::~Plm_image ( )

Member Function Documentation

◆ clone() [1/2]

Plm_image::Pointer Plm_image::clone ( const Plm_image::Pointer &  pli)
static

◆ clone() [2/2]

Plm_image::Pointer Plm_image::clone ( void  )

◆ compare_headers()

int Plm_image::compare_headers ( const Plm_image::Pointer &  pli1,
const Plm_image::Pointer &  pli2 
)
static

◆ convert()

void Plm_image::convert ( Plm_image_type  new_type)

◆ convert_and_save() [1/2]

void Plm_image::convert_and_save ( const char *  fname,
Plm_image_type  new_type 
)

◆ convert_and_save() [2/2]

void Plm_image::convert_and_save ( const std::string &  fname,
Plm_image_type  new_type 
)

◆ convert_gpuit_to_itk()

template<class T , class U >
T Plm_image::convert_gpuit_to_itk ( Volume vol)
protected

◆ convert_gpuit_uchar_vec_to_itk_uchar_vec()

void Plm_image::convert_gpuit_uchar_vec_to_itk_uchar_vec ( )
protected

◆ convert_gpuit_uint32_to_itk_uchar_vec()

void Plm_image::convert_gpuit_uint32_to_itk_uchar_vec ( )
protected

◆ convert_itk_to_gpuit()

template<class T , class U >
void Plm_image::convert_itk_to_gpuit ( img)
protected

◆ convert_itk_uchar_to_itk_uchar_vec()

void Plm_image::convert_itk_uchar_to_itk_uchar_vec ( )
protected

◆ convert_itk_uchar_vec_to_gpuit_uchar_vec()

void Plm_image::convert_itk_uchar_vec_to_gpuit_uchar_vec ( )
protected

◆ convert_itk_uint32_to_itk_uchar_vec()

void Plm_image::convert_itk_uint32_to_itk_uchar_vec ( )
protected

◆ convert_to_itk()

void Plm_image::convert_to_itk ( void  )

◆ convert_to_itk_float_field()

void Plm_image::convert_to_itk_float_field ( void  )

◆ convert_to_itk_uchar_vec()

void Plm_image::convert_to_itk_uchar_vec ( void  )

◆ convert_to_original_type()

void Plm_image::convert_to_original_type ( void  )

◆ create()

void Plm_image::create ( Plm_image_type  type,
const Plm_image_header pih 
)

◆ dim()

size_t Plm_image::dim ( size_t  d1)

◆ free()

void Plm_image::free ( )

◆ free_volume()

void Plm_image::free_volume ( )
protected

◆ get_vol() [1/2]

Volume * Plm_image::get_vol ( )

◆ get_vol() [2/2]

const Volume * Plm_image::get_vol ( ) const

◆ get_volume()

Volume::Pointer & Plm_image::get_volume ( )

◆ get_volume_float()

Volume::Pointer & Plm_image::get_volume_float ( )

◆ get_volume_short()

Volume::Pointer & Plm_image::get_volume_short ( )

◆ get_volume_uchar()

Volume::Pointer & Plm_image::get_volume_uchar ( )

◆ get_volume_uchar_vec()

Volume::Pointer & Plm_image::get_volume_uchar_vec ( )

◆ have_image()

bool Plm_image::have_image ( )

◆ init()

void Plm_image::init ( )

◆ itk_float()

FloatImageType::Pointer & Plm_image::itk_float ( )
inline

◆ itk_short()

ShortImageType::Pointer & Plm_image::itk_short ( )
inline

◆ itk_uchar()

UCharImageType::Pointer & Plm_image::itk_uchar ( )
inline

◆ itk_uchar_vec()

UCharVecImageType::Pointer & Plm_image::itk_uchar_vec ( )
inline

◆ itk_ushort()

UShortImageType::Pointer & Plm_image::itk_ushort ( )
inline

◆ load() [1/2]

bool Plm_image::load ( const char *  fname,
Plm_image_type  type 
)

◆ load() [2/2]

bool Plm_image::load ( const std::string &  fname,
Plm_image_type  type 
)

◆ load_native() [1/2]

bool Plm_image::load_native ( const char *  fname)

◆ load_native() [2/2]

bool Plm_image::load_native ( const std::string &  fn)

◆ load_native_dicom()

bool Plm_image::load_native_dicom ( const char *  fname)

◆ load_native_nki()

bool Plm_image::load_native_nki ( const char *  fname)

◆ origin()

float Plm_image::origin ( size_t  d1)

◆ planes()

int Plm_image::planes ( )

◆ print()

void Plm_image::print ( )

◆ save_image() [1/2]

void Plm_image::save_image ( const char *  fname)

◆ save_image() [2/2]

void Plm_image::save_image ( const std::string &  fname)

◆ set()

void Plm_image::set ( const Plm_image::Pointer &  pli)

◆ set_header() [1/2]

void Plm_image::set_header ( const Plm_image_header pih)

◆ set_header() [2/2]

void Plm_image::set_header ( const Plm_image_header pih)

◆ set_itk() [1/9]

void Plm_image::set_itk ( CharImageType::Pointer  img)

◆ set_itk() [2/9]

void Plm_image::set_itk ( DoubleImageType::Pointer  img)

◆ set_itk() [3/9]

void Plm_image::set_itk ( FloatImageType::Pointer  img)

◆ set_itk() [4/9]

void Plm_image::set_itk ( Int32ImageType::Pointer  img)

◆ set_itk() [5/9]

void Plm_image::set_itk ( ShortImageType::Pointer  img)

◆ set_itk() [6/9]

void Plm_image::set_itk ( UCharImageType::Pointer  img)

◆ set_itk() [7/9]

void Plm_image::set_itk ( UCharVecImageType::Pointer  img)

◆ set_itk() [8/9]

void Plm_image::set_itk ( UInt32ImageType::Pointer  img)

◆ set_itk() [9/9]

void Plm_image::set_itk ( UShortImageType::Pointer  img)

◆ set_volume() [1/4]

void Plm_image::set_volume ( const Volume::Pointer &  v)

◆ set_volume() [2/4]

void Plm_image::set_volume ( const Volume::Pointer &  v,
Plm_image_type  type 
)

◆ set_volume() [3/4]

void Plm_image::set_volume ( Volume v)

◆ set_volume() [4/4]

void Plm_image::set_volume ( Volume v,
Plm_image_type  type 
)

◆ SMART_POINTER_SUPPORT()

Plm_image::SMART_POINTER_SUPPORT ( Plm_image  )

◆ spacing()

float Plm_image::spacing ( size_t  d1)

Member Data Documentation

◆ d_ptr

Plm_image_private* Plm_image::d_ptr

◆ m_itk_char

CharImageType::Pointer Plm_image::m_itk_char

◆ m_itk_double

DoubleImageType::Pointer Plm_image::m_itk_double

◆ m_itk_float

FloatImageType::Pointer Plm_image::m_itk_float

◆ m_itk_int32

Int32ImageType::Pointer Plm_image::m_itk_int32

◆ m_itk_int64

Int64ImageType::Pointer Plm_image::m_itk_int64

◆ m_itk_short

ShortImageType::Pointer Plm_image::m_itk_short

◆ m_itk_uchar

UCharImageType::Pointer Plm_image::m_itk_uchar

◆ m_itk_uchar_vec

UCharVecImageType::Pointer Plm_image::m_itk_uchar_vec

◆ m_itk_uint32

UInt32ImageType::Pointer Plm_image::m_itk_uint32

◆ m_itk_uint64

UInt64ImageType::Pointer Plm_image::m_itk_uint64

◆ m_itk_ushort

UShortImageType::Pointer Plm_image::m_itk_ushort

◆ m_original_type

Plm_image_type Plm_image::m_original_type

◆ m_type

Plm_image_type Plm_image::m_type

The documentation for this class was generated from the following files: