Enumerations | Functions
contrib/mul/vil3d/vil3d_slice.h File Reference
#include <vil/vil_image_view.h>
#include <vil3d/vil3d_image_view.h>
#include <vcl_cassert.h>

Go to the source code of this file.

Enumerations

enum  vil3d_slice_format {
  VIL3D_SLICE_FORMAT_IJ = 0, VIL3D_SLICE_FORMAT_JI = 1, VIL3D_SLICE_FORMAT_IK = 2, VIL3D_SLICE_FORMAT_KI = 3,
  VIL3D_SLICE_FORMAT_JK = 4, VIL3D_SLICE_FORMAT_KJ = 5
}
 Define format of a slice from a 3D volume. More...

Functions

template<class T >
vil_image_view< T > vil3d_slice_ji (const vil3d_image_view< T > &im, unsigned k)
 Return a 2D view of slice k of 3D image aligned as (j,i).
template<class T >
vil_image_view< T > vil3d_slice_ij (const vil3d_image_view< T > &im, unsigned k)
 Return a 2D view of slice k of 3D image aligned as (i,j).
template<class T >
vil_image_view< T > vil3d_slice_jk (const vil3d_image_view< T > &im, unsigned i)
 Return a 2D view of slice i of 3D image aligned as (j,k).
template<class T >
vil_image_view< T > vil3d_slice_kj (const vil3d_image_view< T > &im, unsigned i)
 Return a 2D view of slice i of 3D image aligned as (k,j).
template<class T >
vil_image_view< T > vil3d_slice_ki (const vil3d_image_view< T > &im, unsigned j)
 Return a 2D view of slice j of 3D image aligned as (k,i).
template<class T >
vil_image_view< T > vil3d_slice_ik (const vil3d_image_view< T > &im, unsigned j)
 Return a 2D view of slice j of 3D image aligned as (i,k).
template<class T >
vil_image_view< T > vil3d_slice (const vil3d_image_view< T > &im, unsigned slice_index, vil3d_slice_format slice_format)
 Return a 2D view of slice of a 3D image aligned as defined by slice_format.
unsigned vil3d_n_slices (const vil3d_image_view_base &image, vil3d_slice_format slice_format)
 Return number of possible slices of image given the selected format.
double vil3d_slice_pixel_width_i (double src_i_width, double src_j_width, double src_k_width, vil3d_slice_format slice_format)
 Return pixel width in i direction of slice, given widths of original 3D volume pixels.
double vil3d_slice_pixel_width_j (double src_i_width, double src_j_width, double src_k_width, vil3d_slice_format slice_format)
 Return pixel width in j direction of slice, given widths of original 3D volume pixels.
double vil3d_slice_separation (double src_i_width, double src_j_width, double src_k_width, vil3d_slice_format slice_format)
 Return separation of neighbouring slices, given widths of original 3D volume pixels.

Detailed Description

Author:
Tim Cootes.

Definition in file vil3d_slice.h.


Enumeration Type Documentation

Define format of a slice from a 3D volume.

Enumerator:
VIL3D_SLICE_FORMAT_IJ 
VIL3D_SLICE_FORMAT_JI 
VIL3D_SLICE_FORMAT_IK 
VIL3D_SLICE_FORMAT_KI 
VIL3D_SLICE_FORMAT_JK 
VIL3D_SLICE_FORMAT_KJ 

Definition at line 118 of file vil3d_slice.h.


Function Documentation

unsigned vil3d_n_slices ( const vil3d_image_view_base image,
vil3d_slice_format  slice_format 
) [inline]

Return number of possible slices of image given the selected format.

Thus if slice_format==VIL3D_SLICE_FORMAT_IJ then return image.nk().

Definition at line 151 of file vil3d_slice.h.

template<class T >
vil_image_view< T > vil3d_slice ( const vil3d_image_view< T > &  im,
unsigned  slice_index,
vil3d_slice_format  slice_format 
) [inline]

Return a 2D view of slice of a 3D image aligned as defined by slice_format.

Thus if slice_format==VIL3D_SLICE_FORMAT_IJ then i-j slice returned at z=slice_index.

Definition at line 133 of file vil3d_slice.h.

template<class T >
vil_image_view< T > vil3d_slice_ij ( const vil3d_image_view< T > &  im,
unsigned  k 
) [inline]

Return a 2D view of slice k of 3D image aligned as (i,j).

result(x,y,p)=im(x,y,k,p)

Definition at line 37 of file vil3d_slice.h.

template<class T >
vil_image_view< T > vil3d_slice_ik ( const vil3d_image_view< T > &  im,
unsigned  j 
) [inline]

Return a 2D view of slice j of 3D image aligned as (i,k).

result(x,y,p)=im(x,i,y,p)

Definition at line 105 of file vil3d_slice.h.

template<class T >
vil_image_view< T > vil3d_slice_ji ( const vil3d_image_view< T > &  im,
unsigned  k 
) [inline]

Return a 2D view of slice k of 3D image aligned as (j,i).

result(x,y,p)=im(y,x,k,p)

Definition at line 20 of file vil3d_slice.h.

template<class T >
vil_image_view< T > vil3d_slice_jk ( const vil3d_image_view< T > &  im,
unsigned  i 
) [inline]

Return a 2D view of slice i of 3D image aligned as (j,k).

result(x,y,p)=im(i,x,y,p)

Definition at line 54 of file vil3d_slice.h.

template<class T >
vil_image_view< T > vil3d_slice_ki ( const vil3d_image_view< T > &  im,
unsigned  j 
) [inline]

Return a 2D view of slice j of 3D image aligned as (k,i).

result(x,y,p)=im(y,i,x,p)

Definition at line 88 of file vil3d_slice.h.

template<class T >
vil_image_view< T > vil3d_slice_kj ( const vil3d_image_view< T > &  im,
unsigned  i 
) [inline]

Return a 2D view of slice i of 3D image aligned as (k,j).

result(x,y,p)=im(i,y,x,p)

Definition at line 71 of file vil3d_slice.h.

double vil3d_slice_pixel_width_i ( double  src_i_width,
double  src_j_width,
double  src_k_width,
vil3d_slice_format  slice_format 
) [inline]

Return pixel width in i direction of slice, given widths of original 3D volume pixels.

Thus if slice_format==VIL3D_SLICE_FORMAT_JK then return src_j_width.

Definition at line 169 of file vil3d_slice.h.

double vil3d_slice_pixel_width_j ( double  src_i_width,
double  src_j_width,
double  src_k_width,
vil3d_slice_format  slice_format 
) [inline]

Return pixel width in j direction of slice, given widths of original 3D volume pixels.

Thus if slice_format==VIL3D_SLICE_FORMAT_JK then return src_k_width.

Definition at line 187 of file vil3d_slice.h.

double vil3d_slice_separation ( double  src_i_width,
double  src_j_width,
double  src_k_width,
vil3d_slice_format  slice_format 
) [inline]

Return separation of neighbouring slices, given widths of original 3D volume pixels.

Thus if slice_format==VIL3D_SLICE_FORMAT_JK then return src_i_width.

Definition at line 205 of file vil3d_slice.h.