Classes | Typedefs | Enumerations | Functions | Variables
i3d Namespace Reference

Classes

struct  RGB_generic
 Generic RGB type. More...
struct  T_pair
 This is an VOI internal structure. More...
class  LibException
 Generic exception class. More...
class  IOException
 IO Exception. More...
class  InternalException
 Internal exception. More...
class  BioFormatsReader
 Reader subclass which uses the OME Bio-Formats Java library to read images. More...
class  Image3d
 The main template class which stores and manipulates the image data. More...
class  VectField3d
 Vector field is specialized 3d image, where each voxel has three componenets wrapped in Vector3d structure. More...
class  DCMReader
 Class for reading the DCM files. More...
class  DCMWriter
 Class for writing the DCM files. More...
struct  ImageFileHeader
 modified by Maros Gonda (mano@mail.muni.cz) 2011 More...
struct  ImageHeader
struct  ImgFormatsTable
 Table of implemented image file format. More...
class  ImageReader
 General (abstract) object for reading image file formats. More...
class  ImageWriter
 General object for writting image file formats. More...
class  SequenceReader
 The basic class for reading the image sequences. More...
class  SequenceWriter
 The basic class for writing the image sequences. More...
class  HDF5Reader
 Class for reading HDF5 files. More...
class  HDF5Writer
 Class for writing HDF5 files. More...
class  I3DReader
 Image 3d (internal format of i3dlib) Reader. More...
class  I3DWriter
 Image 3d (internal format of i3dlib) Writer. More...
struct  T_units2microns
class  ICSReader
 Class for reading the ICS files. More...
class  ICSWriter
 Class for writing the ICS files. More...
class  JPEGReader
 Class for reading JPEG files. More...
class  JPEGWriter
 Class for writing JPEG files. More...
struct  METAIOTypeToImgVoxelTypeTable
struct  METAIOTypeNameToEnum
struct  METAIOHeader
 struct with parameters of the image read from the header of the text *.mhd or *.mha file More...
class  METAIOReader
 Class for reading MetaIO files. More...
class  METAIOWriter
 Class for writing the MetaIO files. More...
class  PNGReader
 Class for reading PNG files. More...
class  PNGWriter
 Class for writing PNG files. More...
struct  TGAHeader
class  TGAReader
 Class for reading TGA files. More...
class  TGAWriter
 Class for writing TGA files. More...
class  TIFFReader
 Class for reading the TIFF files. More...
class  TIFFWriter
 Class for writing the TIFF files. More...
class  Resolution
 3D image resolution. More...
class  VoxelConversion
 Convert a voxel value of a type T1 to a type T2. More...
class  VoxelConversion< T1, bool >
 Partial specialization of the base VoxelConversion class intended for the binary output type. More...
struct  Vector3d
 General structure for 3D coordinations manipulation. More...
class  _X_
class  _Y_
class  _Z_
struct  VOI
 Volume of interest. More...

Typedefs

typedef byte GRAY8
typedef unsigned short GRAY16
typedef RGB_generic< GRAY8RGB
typedef RGB_generic< GRAY16RGB16
typedef T_pair< int, size_t > PIXELS
typedef T_pair< size_t, size_t > UPIXELS
typedef T_pair< float, float > MICRONS
typedef std::vector< std::string > FileList
typedef std::valarray< float > * PointerVector3d
typedef Vector3d< float > Offset
typedef Vector3d< int > Coords

Enumerations

enum  FileFormat {
  IMG_UNKNOWN, IMG_TARGA, IMG_I3D, IMG_JPEG,
  IMG_PNG, IMG_TIFF, IMG_METAIO, IMG_ICSv1,
  IMG_ICSv2, IMG_HDF5, IMG_DCM
}
enum  ImgVoxelType {
  UnknownVoxel, BinaryVoxel, Gray8Voxel, Gray16Voxel,
  IntegerVoxel, RGBVoxel, RGB16Voxel, FloatVoxel,
  DoubleVoxel, Complex32Voxel, Complex64Voxel, VectFloatVoxel,
  VectDoubleVoxel
}
enum  METAIOType {
  MET_NONE, MET_ASCII_CHAR, MET_CHAR, MET_UCHAR,
  MET_SHORT, MET_USHORT, MET_INT, MET_UINT,
  MET_LONG, MET_ULONG, MET_FLOAT, MET_DOUBLE,
  MET_STRING, MET_CHAR_ARRAY, MET_UCHAR_ARRAY, MET_SHORT_ARRAY,
  MET_USHORT_ARRAY, MET_INT_ARRAY, MET_UINT_ARRAY, MET_FLOAT_ARRAY,
  MET_DOUBLE_ARRAY, MET_FLOAT_MATRIX, MET_OTHER
}
enum  TGAType {
  TGAColormap = 1, TGARGB = 2, TGAGray = 3, TGALEColormap = 9,
  TGALERGB = 10, TGALEGray = 11
}

Functions

template<class T >
ColorInversion (const T &v)
template<>
I3D_CORE_EXPORT bool ColorInversion (const bool &v)
template I3D_CORE_EXPORT GRAY8 ColorInversion (const GRAY8 &)
template I3D_CORE_EXPORT GRAY16 ColorInversion (const GRAY16 &)
template I3D_CORE_EXPORT RGB ColorInversion (const RGB &)
template I3D_CORE_EXPORT float ColorInversion (const float &)
ostream & operator<< (std::ostream &o, const IOException &e)
ostream & operator<< (std::ostream &o, const InternalException &e)
template<class T >
bool operator== (const RGB_generic< T > &x, const RGB_generic< T > &y)
template<class T >
bool operator!= (const RGB_generic< T > &x, const RGB_generic< T > &y)
template<class T >
RGB_generic< T > operator+ (const RGB_generic< T > &x, const RGB_generic< T > &y)
template<class T >
RGB_generic< T > operator- (const RGB_generic< T > &x, const RGB_generic< T > &y)
template<class T >
bool operator< (const RGB_generic< T > &x, const RGB_generic< T > &y)
template<class T >
bool operator<= (const RGB_generic< T > &x, const RGB_generic< T > &y)
template<class T >
bool operator> (const RGB_generic< T > &x, const RGB_generic< T > &y)
template<class T >
bool operator>= (const RGB_generic< T > &x, const RGB_generic< T > &y)
template<class T >
RGB_generic< T > min (const RGB_generic< T > &x, const RGB_generic< T > &y)
template<class T >
RGB_generic< T > max (const RGB_generic< T > &x, const RGB_generic< T > &y)
bool i3dAssertFn (const char *expression, const char *description, const char *file, const char *function, int line, int *hit, int behavior)
ImageReaderCreateReader (const char *, const VOI< PIXELS > *voi=NULL, bool is_regex=false)
ImageWriterCreateWriter (const char *, FileFormat ft, Vector3d< size_t > sz, const VOI< PIXELS > *voi=NULL)
void DestroyWriter (ImageWriter *)
void DestroyReader (ImageReader *)
std::gslice VOItoGslice (const VOI< UPIXELS > &voi, const Vector3d< size_t > &imgsize)
void NOTIMPLFORCOMPLEX (void)
template<class FULL_COLOR , class GRAY_CHANNEL >
bool CopyChannel (const Image3d< FULL_COLOR > &rgb, Image3d< GRAY_CHANNEL > &gray, int channel)
template<class GRAY_CHANNEL , class FULL_COLOR >
bool CopyChannelBack (const Image3d< GRAY_CHANNEL > &gray, Image3d< FULL_COLOR > &rgb, int channel)
template<class VOXELIN , class VOXELOUT >
void FloatToGray (const Image3d< VOXELIN > &fimg, Image3d< VOXELOUT > &gimg)
template<class VOXELIN , class VOXELOUT >
void FloatToGrayNoWeight (const Image3d< VOXELIN > &fimg, Image3d< VOXELOUT > &gimg)
template<class VOXELIN , class VOXELOUT >
void GrayToFloat (const Image3d< VOXELIN > &gimg, Image3d< VOXELOUT > &fimg)
template<class VOXELIN , class VOXELOUT >
void GrayToFloatNormalized (const Image3d< VOXELIN > &gimg, Image3d< VOXELOUT > &fimg)
template I3D_CORE_EXPORT void FloatToGray (const Image3d< float > &fimg, Image3d< GRAY8 > &gimg)
template I3D_CORE_EXPORT void FloatToGray (const Image3d< float > &fimg, Image3d< GRAY16 > &gimg)
template I3D_CORE_EXPORT void FloatToGray (const Image3d< double > &fimg, Image3d< GRAY8 > &gimg)
template I3D_CORE_EXPORT void FloatToGray (const Image3d< double > &fimg, Image3d< GRAY16 > &gimg)
template I3D_CORE_EXPORT void FloatToGrayNoWeight (const Image3d< float > &fimg, Image3d< GRAY8 > &gimg)
template I3D_CORE_EXPORT void FloatToGrayNoWeight (const Image3d< float > &fimg, Image3d< GRAY16 > &gimg)
template I3D_CORE_EXPORT void FloatToGrayNoWeight (const Image3d< double > &fimg, Image3d< GRAY8 > &gimg)
template I3D_CORE_EXPORT void FloatToGrayNoWeight (const Image3d< double > &fimg, Image3d< GRAY16 > &gimg)
template I3D_CORE_EXPORT void GrayToFloat (const Image3d< GRAY8 > &gimg, Image3d< float > &fimg)
template I3D_CORE_EXPORT void GrayToFloat (const Image3d< GRAY8 > &gimg, Image3d< double > &fimg)
template I3D_CORE_EXPORT void GrayToFloat (const Image3d< GRAY16 > &gimg, Image3d< float > &fimg)
template I3D_CORE_EXPORT void GrayToFloat (const Image3d< GRAY16 > &gimg, Image3d< double > &fimg)
template I3D_CORE_EXPORT void GrayToFloatNormalized (const Image3d< GRAY8 > &gimg, Image3d< float > &fimg)
template I3D_CORE_EXPORT void GrayToFloatNormalized (const Image3d< GRAY8 > &gimg, Image3d< double > &fimg)
template I3D_CORE_EXPORT void GrayToFloatNormalized (const Image3d< GRAY16 > &gimg, Image3d< float > &fimg)
template I3D_CORE_EXPORT void GrayToFloatNormalized (const Image3d< GRAY16 > &gimg, Image3d< double > &fimg)
template<class VOXEL >
void BinaryToScalar (const Image3d< bool > &bimg, Image3d< VOXEL > &simg)
template<class VOXEL >
void GrayToBinary (const Image3d< VOXEL > &gimg, Image3d< bool > &bimg)
template I3D_CORE_EXPORT void BinaryToScalar (const Image3d< bool > &, Image3d< GRAY8 > &)
template I3D_CORE_EXPORT void BinaryToScalar (const Image3d< bool > &, Image3d< GRAY16 > &)
template I3D_CORE_EXPORT void BinaryToScalar (const Image3d< bool > &, Image3d< float > &)
template I3D_CORE_EXPORT void BinaryToScalar (const Image3d< bool > &, Image3d< double > &)
template I3D_CORE_EXPORT void GrayToBinary (const Image3d< GRAY8 > &, Image3d< bool > &)
template I3D_CORE_EXPORT void GrayToBinary (const Image3d< GRAY16 > &, Image3d< bool > &)
template<class FULL_COLOR , class GRAY_CHANNEL >
void RGBtoGray (const Image3d< FULL_COLOR > &rgb, Image3d< GRAY_CHANNEL > &red, Image3d< GRAY_CHANNEL > &green, Image3d< GRAY_CHANNEL > &blue)
template<class GRAY_CHANNEL , class FULL_COLOR >
void GrayToRGB (const Image3d< GRAY_CHANNEL > &red, const Image3d< GRAY_CHANNEL > &green, const Image3d< GRAY_CHANNEL > &blue, Image3d< FULL_COLOR > &rgb)
template I3D_CORE_EXPORT void RGBtoGray< RGB, GRAY8 > (const Image3d< RGB > &, Image3d< GRAY8 > &, Image3d< GRAY8 > &, Image3d< GRAY8 > &)
template I3D_CORE_EXPORT void RGBtoGray< RGB16, GRAY16 > (const Image3d< RGB16 > &, Image3d< GRAY16 > &, Image3d< GRAY16 > &, Image3d< GRAY16 > &)
template I3D_CORE_EXPORT bool CopyChannelBack< GRAY8, RGB > (const Image3d< GRAY8 > &, Image3d< RGB > &, int channel)
template I3D_CORE_EXPORT bool CopyChannelBack< GRAY16, RGB16 > (const Image3d< GRAY16 > &, Image3d< RGB16 > &, int channel)
template I3D_CORE_EXPORT bool CopyChannel< RGB, GRAY8 > (const Image3d< RGB > &, Image3d< GRAY8 > &, int channel)
template I3D_CORE_EXPORT bool CopyChannel< RGB16, GRAY16 > (const Image3d< RGB16 > &, Image3d< GRAY16 > &, int channel)
template I3D_CORE_EXPORT void GrayToRGB< GRAY8, RGB > (const Image3d< GRAY8 > &, const Image3d< GRAY8 > &, const Image3d< GRAY8 > &, Image3d< RGB > &)
template I3D_CORE_EXPORT void GrayToRGB< GRAY16, RGB16 > (const Image3d< GRAY16 > &, const Image3d< GRAY16 > &, const Image3d< GRAY16 > &, Image3d< RGB16 > &)
template<class VOXEL >
void GenerateDummyVoxels (const Image3d< VOXEL > &ImgIn, Image3d< VOXEL > &ImgOut, VOXEL Value, const Vector3d< size_t > &width)
template I3D_CORE_EXPORT void GenerateDummyVoxels (const Image3d< GRAY8 > &ImgIn, Image3d< GRAY8 > &ImgOut, GRAY8 Value, const Vector3d< size_t > &width)
template I3D_CORE_EXPORT void GenerateDummyVoxels (const Image3d< GRAY16 > &ImgIn, Image3d< GRAY16 > &ImgOut, GRAY16 Value, const Vector3d< size_t > &width)
template I3D_CORE_EXPORT void GenerateDummyVoxels (const Image3d< float > &ImgIn, Image3d< float > &ImgOut, float Value, const Vector3d< size_t > &width)
size_t GetIndex (size_t x, size_t y, size_t z, const Vector3d< size_t > &imgsize)
size_t GetIndex (const Vector3d< size_t > &coord, const Vector3d< size_t > &imgsize)
template<class FULL_COLOR , class COLOR_CHANNEL >
I3D_CORE_EXPORT void RGBtoGray (const Image3d< FULL_COLOR > &, Image3d< COLOR_CHANNEL > &red, Image3d< COLOR_CHANNEL > &green, Image3d< COLOR_CHANNEL > &blue)
template<class COLOR_CHANNEL , class FULL_COLOR >
I3D_CORE_EXPORT void GrayToRGB (const Image3d< COLOR_CHANNEL > &red, const Image3d< COLOR_CHANNEL > &green, const Image3d< COLOR_CHANNEL > &blue, Image3d< FULL_COLOR > &rgb)
template<class T >
bool MicronsToImagePixels (const Vector3d< float > &v_mic, const Image3d< T > &img, Vector3d< size_t > &v_pix)
ImgVoxelType StringToVoxelType (const std::string &s)
string VoxelTypeToString (const ImgVoxelType vt)
const size_t TableSize (sizeof(ImgFormat)/sizeof(ImgFormatsTable))
FileFormat GuessFileFormat (const char *fname)
string UpperCase (string s)
ImgVoxelType ReadImageType (const char *fname, FileFormat ft=IMG_UNKNOWN)
ImageHeader ReadImageHeader (const char *fname, FileFormat ft=IMG_UNKNOWN)
FileFormat StringToFileFormat (const std::string &s)
string FileFormatToString (const FileFormat ff)
FileFormat ExtensionToFileFormat (const std::string &s)
string FileFormatToExtension (const FileFormat ff)
size_t GetMaxDimensionality (const FileFormat ff)
bool ReadConfig (const char *fname, std::map< std::string, std::string > &items, const char sep)
bool SaveConfig (const char *fname, const std::map< std::string, std::string > &items, const char sep='=')
void IcsError2IOException (Ics_Error retval)
bool IsRGB (char *str)
ImgVoxelType METAIOTypeToImgVoxelType (int channels, METAIOType in)
METAIOType ImgVoxelTypeToMETAIOType (int &channels, ImgVoxelType in)
METAIOType StrToMETAIOType (const std::string &s)
std::string METAIOTypeToStr (const METAIOType in)
void ReadInt (std::string &s, int &i, int def, std::string errormsg)
void ReadFloat (std::string &s, float &i, float def, std::string errormsg)
bool IsByteOrderMSB ()
unsigned short ByteOrderSwapShort (unsigned short x)
unsigned long ByteOrderSwapLong (unsigned long x)
double ByteOrderSwap8 (double x)
void SwapByteOrder (ImgVoxelType ElementType, void *data, size_t size)
bool CompareByteOrder (bool ByteOrderMSB)
void swapRB (RGB *voxel)
template<class T >
static long writePixels (FILE *fd, T *data, size_t n, bool isRGB)
template<class T >
static void flushRaw (FILE *fd, const T *from, size_t rlen, bool isRGB)
template<class T >
static void flushCompressed (FILE *fd, const T *from, size_t clen, bool isRGB)
static void _XTIFFDefaultDirectory (TIFF *tif)
static void _XTIFFInitialize (void)
void PixelUnpacking (unsigned char PackedByte, bool *Unpacked, unsigned count=CHAR_BIT)
void PixelPacking (const bool *Unpacked, unsigned char &PackedByte, unsigned count=CHAR_BIT)
template I3D_CORE_EXPORT
Vector3d< float > 
PixelsToMicrons (const Vector3d< PIXELS::T_offset > &v, const Resolution &r)
template I3D_CORE_EXPORT
Vector3d< float > 
PixelsToMicrons (const Vector3d< PIXELS::T_size > &v, const Resolution &r)
const Vector3d< float > DefaultResolution (10, 10, 10)
Vector3d< PIXELS::T_offsetMicronsToPixels (const Vector3d< float > &v, const Resolution &r)
template<class T >
I3D_CORE_EXPORT Vector3d< float > PixelsToMicrons (const Vector3d< T > &v, const Resolution &r)
string itos (int n)
bool StrToInt (const std::string &s, int &i)
bool StrToFloat (const std::string &s, float &f)
void Tokenize (const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters=" ")
string Trim (const string &s)
string AfterLast (const string &s, char sep)
string BeforeLast (const string &s, char sep)
int cmp_nocase (const std::string &s1, const std::string &s2)
template<class T >
size_t num_digits (T number, int base)
template I3D_CORE_EXPORT size_t num_digits (int number, int base)
template I3D_CORE_EXPORT size_t num_digits (size_t number, int base)
std::string human_readable (double number, unsigned precision)
std::string human_readable (unsigned long long number)
size_t GetNumberOfProcessors ()
unsigned long long GetFreeMemory ()
unsigned long long GetTotalMemory ()
void GetExtension (const std::string &fn, std::string &ext)
void GetPath (const std::string &fn, std::string &path)
void SplitFilename (const std::string &fn, std::string &path, std::string &name, std::string &ext)
string GetDir ()
void SetDir (const char *dir)
size_t ScanDir (const char *dir, const char *fnames, FileList &namelist, int regflags=REG_EXTENDED|REG_NOSUB)
size_t MaskExpand (const char *mask, FileList &namelist, bool expand)
void SetBadIOException (std::ios &io)
unsigned long LSBFirstReadLong (std::istream &file)
void LSBFirstWriteLong (std::ostream &file, unsigned long value)
unsigned short LSBFirstReadShort (std::istream &file)
void LSBFirstWriteShort (std::ostream &file, unsigned short value)
unsigned long LSBFirstToLong (byte buf[4])
void LongToLSBFirst (byte buf[4], unsigned long value)
unsigned short LSBFirstToShort (byte buf[2])
void ShortToLSBFirst (byte buf[2], unsigned short value)
template<class T >
void SwapVert (size_t width, size_t height, T *data)
template I3D_CORE_EXPORT void SwapVert (size_t, size_t, bool *)
template I3D_CORE_EXPORT void SwapVert (size_t, size_t, GRAY8 *)
template I3D_CORE_EXPORT void SwapVert (size_t, size_t, RGB *)
template I3D_CORE_EXPORT void SwapVert (size_t, size_t, GRAY16 *)
template I3D_CORE_EXPORT void SwapVert (size_t, size_t, float *)
template I3D_CORE_EXPORT void SwapVert (size_t, size_t, double *)
template I3D_CORE_EXPORT void SwapVert (size_t, size_t, size_t *)
template I3D_CORE_EXPORT void SwapVert (size_t, size_t, int *)
template I3D_CORE_EXPORT void SwapVert (size_t, size_t, Vector3d< double > *)
template I3D_CORE_EXPORT void SwapVert (size_t, size_t, Vector3d< float > *)
template I3D_CORE_EXPORT void SwapVert (size_t, size_t, std::complex< float > *)
template I3D_CORE_EXPORT void SwapVert (size_t, size_t, std::complex< double > *)
template<class T >
void SwapHoriz (size_t width, size_t height, T *data)
template I3D_CORE_EXPORT void SwapHoriz (size_t, size_t, bool *)
template I3D_CORE_EXPORT void SwapHoriz (size_t, size_t, GRAY8 *)
template I3D_CORE_EXPORT void SwapHoriz (size_t, size_t, RGB *)
template I3D_CORE_EXPORT void SwapHoriz (size_t, size_t, GRAY16 *)
template I3D_CORE_EXPORT void SwapHoriz (size_t, size_t, float *)
template I3D_CORE_EXPORT void SwapHoriz (size_t, size_t, double *)
template I3D_CORE_EXPORT void SwapHoriz (size_t, size_t, size_t *)
template I3D_CORE_EXPORT void SwapHoriz (size_t, size_t, int *)
template I3D_CORE_EXPORT void SwapHoriz (size_t, size_t, Vector3d< double > *)
template I3D_CORE_EXPORT void SwapHoriz (size_t, size_t, Vector3d< float > *)
template I3D_CORE_EXPORT void SwapHoriz (size_t, size_t, std::complex< double > *)
template I3D_CORE_EXPORT void SwapHoriz (size_t, size_t, std::complex< float > *)
template<class T >
void ReverseColors (size_t width, size_t height, T *data)
template void I3D_CORE_EXPORT ReverseColors (size_t, size_t, bool *)
template void I3D_CORE_EXPORT ReverseColors (size_t, size_t, GRAY8 *)
template void I3D_CORE_EXPORT ReverseColors (size_t, size_t, RGB *)
template void I3D_CORE_EXPORT ReverseColors (size_t, size_t, GRAY16 *)
template void I3D_CORE_EXPORT ReverseColors (size_t, size_t, float *)
template<typename ITERATOR >
void normalize (ITERATOR first, ITERATOR last)
template<typename ITERATOR >
void normalize (ITERATOR first, const long int count)
template<class T >
ostream & operator<< (ostream &os, const Vector3d< T > &v)
template<class T >
istream & operator>> (istream &is, Vector3d< T > &v)
template I3D_CORE_EXPORT ostream & operator<< (ostream &, const Vector3d< int > &)
template I3D_CORE_EXPORT ostream & operator<< (ostream &, const Vector3d< size_t > &)
template I3D_CORE_EXPORT ostream & operator<< (ostream &, const Vector3d< long > &)
template I3D_CORE_EXPORT ostream & operator<< (ostream &, const Vector3d< float > &)
template I3D_CORE_EXPORT ostream & operator<< (ostream &, const Vector3d< double > &)
template I3D_CORE_EXPORT istream & operator>> (istream &, Vector3d< int > &)
template I3D_CORE_EXPORT istream & operator>> (istream &, Vector3d< size_t > &)
template I3D_CORE_EXPORT istream & operator>> (istream &, Vector3d< long > &)
template I3D_CORE_EXPORT istream & operator>> (istream &, Vector3d< float > &)
template I3D_CORE_EXPORT istream & operator>> (istream &, Vector3d< double > &)
template<class T >
Norm (const Vector3d< T > &v)
template<class T >
Norm2 (const Vector3d< T > &v)
template<class T >
Dot (const Vector3d< T > &u, const Vector3d< T > &v)
template<class T >
Vector3d< T > Cross (const Vector3d< T > &u, const Vector3d< T > &v)
template<class T >
Vector3d< T > max (const Vector3d< T > &v1, const Vector3d< T > &v2)
template<class T >
Vector3d< T > min (const Vector3d< T > &v1, const Vector3d< T > &v2)
template<class T >
Vector3d< T > operator+ (const Vector3d< T > &v1, const Vector3d< T > &v2)
template<class T >
Vector3d< T > operator- (const Vector3d< T > &v1, const Vector3d< T > &v2)
template<class T >
Vector3d< T > operator* (const Vector3d< T > &v1, const Vector3d< T > &v2)
template<class T >
Vector3d< T > operator/ (const Vector3d< T > &v1, const Vector3d< T > &v2)
template<class T >
Vector3d< T > operator+ (const Vector3d< T > &v, T s)
template<class T >
Vector3d< T > operator- (const Vector3d< T > &v, T s)
template<class T >
Vector3d< T > operator* (const Vector3d< T > &v, T s)
template<class T >
Vector3d< T > operator/ (const Vector3d< T > &v, T s)
template<class T >
Vector3d< T > operator+ (T s, const Vector3d< T > &v)
template<class T >
Vector3d< T > operator- (T s, const Vector3d< T > &v)
template<class T >
Vector3d< T > operator* (T s, const Vector3d< T > &v)
template<class T >
Vector3d< T > operator/ (T s, const Vector3d< T > &v)
Vector3d< PIXELS::T_offsetoperator+ (const Vector3d< PIXELS::T_offset > &v1, const Vector3d< PIXELS::T_size > &v2)
template<class T >
Vector3d< T > abs (const Vector3d< T > &v)
template<class T >
bool operator== (const Vector3d< T > &v1, const Vector3d< T > &v2)
template<class T >
bool operator!= (const Vector3d< T > &v1, const Vector3d< T > &v2)
template<class T >
bool operator> (const Vector3d< T > &v1, const Vector3d< T > &v2)
template<class T >
bool operator< (const Vector3d< T > &v1, const Vector3d< T > &v2)
template<class T >
bool le (const Vector3d< T > &v1, const Vector3d< T > &v2)
template<class T >
bool StrToVector3d (const char *from, Vector3d< T > &v)
template<class C , class T >
T & GetRef (Vector3d< T > &v)
template<class C , class T >
GetComp (const Vector3d< T > &v)
template<class UNIT >
bool operator== (const VOI< UNIT > &v1, const VOI< UNIT > &v2)
template<class UNIT >
bool operator!= (const VOI< UNIT > &v1, const VOI< UNIT > &v2)
template<class UNIT >
VOI< UNIT > operator* (const VOI< UNIT > &v1, const VOI< UNIT > &v2)
template<class UNIT >
VOI< UNIT > operator+ (const VOI< UNIT > &v1, const VOI< UNIT > &v2)
template<class UNIT >
std::ostream & operator<< (std::ostream &os, const VOI< UNIT > &v)
template<class UNIT >
bool InOO (const VOI< UNIT > &voi, const Vector3d< typename UNIT::T_offset > &point)
template<class UNIT >
bool InOC (const VOI< UNIT > &voi, const Vector3d< typename UNIT::T_offset > &point)
template<class UNIT >
bool InCO (const VOI< UNIT > &voi, const Vector3d< typename UNIT::T_offset > &point)
template<class UNIT >
bool InCC (const VOI< UNIT > &voi, const Vector3d< typename UNIT::T_offset > &point)

Variables

template struct I3D_CORE_EXPORT RGB_generic< GRAY8 >
template struct I3D_CORE_EXPORT RGB_generic< GRAY16 >
template class I3D_CORE_EXPORT Image3d< int >
template class I3D_CORE_EXPORT Image3d< size_t >
template class I3D_CORE_EXPORT Image3d< float >
template class I3D_CORE_EXPORT Image3d< double >
template class I3D_CORE_EXPORT Image3d< RGB >
template class I3D_CORE_EXPORT Image3d< GRAY8 >
template class I3D_CORE_EXPORT Image3d< bool >
template class I3D_CORE_EXPORT Image3d< GRAY16 >
template class I3D_CORE_EXPORT Image3d< RGB16 >
template class I3D_CORE_EXPORT Image3d< complex< float >>
template class I3D_CORE_EXPORT Image3d< complex< double >>
template class I3D_CORE_EXPORT Image3d< Vector3d< float >>
template class I3D_CORE_EXPORT Image3d< Vector3d< double >>
template class I3D_CORE_EXPORT VectField3d< float >
template class I3D_CORE_EXPORT VectField3d< double >
const ImgFormatsTable ImgFormat []
const T_units2microns units []
const size_t num_of_recognized_units = sizeof(units)/sizeof(T_units2microns)
const METAIOTypeToImgVoxelTypeTable TypeConv []
const METAIOTypeNameToEnum METAIONameToTypeConv []
const int TGA_ATTRIB_ABITS = 0x0f
const int TGA_ATTRIB_HORIZONTAL = 0x10
const int TGA_ATTRIB_VERTICAL = 0x20
static const TIFFFieldInfo xtiffFieldInfo []
static TIFFExtendProc _ParentExtender = NULL
template I3D_CORE_EXPORT class VoxelConversion< int, GRAY8 >
template I3D_CORE_EXPORT class VoxelConversion< int, GRAY16 >
template I3D_CORE_EXPORT class VoxelConversion< int, bool >
template I3D_CORE_EXPORT class VoxelConversion< int, float >
template I3D_CORE_EXPORT class VoxelConversion< float, GRAY8 >
template I3D_CORE_EXPORT class VoxelConversion< float, GRAY16 >
template I3D_CORE_EXPORT class VoxelConversion< float, bool >
template I3D_CORE_EXPORT class VoxelConversion< float, float >
template I3D_CORE_EXPORT class VoxelConversion< long double, GRAY8 >
template I3D_CORE_EXPORT class VoxelConversion< long double, GRAY16 >
template I3D_CORE_EXPORT class VoxelConversion< long double, bool >
template I3D_CORE_EXPORT class VoxelConversion< long double, float >
template struct I3D_CORE_EXPORT Vector3d< int >
template struct I3D_CORE_EXPORT Vector3d< size_t >
template struct I3D_CORE_EXPORT Vector3d< long >
template struct I3D_CORE_EXPORT Vector3d< float >
template struct I3D_CORE_EXPORT Vector3d< double >
template struct I3D_CORE_EXPORT VOI< PIXELS >
template struct I3D_CORE_EXPORT VOI< UPIXELS >
template struct I3D_CORE_EXPORT VOI< MICRONS >

Detailed Description

FILE: i3dio.h.

Namespace of i3d library .

input/output manipulation routines for variaous image formats

David Svoboda <svoboda@fi.muni.cz> 2005 Maros Gonda (mano@mail.muni.cz) 2011

This namespace contains all symbols declared and/or defined in i3dlib.


Typedef Documentation

typedef byte i3d::GRAY8

8-bit unsigned grayscale type.

This type is intended for 8-bit unsigned grayscale images with range [0..255].

typedef unsigned short i3d::GRAY16

16-bit unsigned grayscale type.

This type is intended for 16-bit unsigned grayscale images with range [0..65535].

RGB type with 8-bit components.

This type is intended for unsigned 24-bit RGB images, i.e. with 8-bit components.

RGB type with 16-bit components.

This type is intended for unsigned 48-bit RGB images, i.e. with 16-bit components.

typedef T_pair<int, size_t> i3d::PIXELS

These are two preferred VOI basic types for integer coordinates and sizes.

It forces the compiler to warn when one uses signed type for size element of VOI type.

typedef T_pair<size_t, size_t> i3d::UPIXELS
typedef T_pair<float, float> i3d::MICRONS

This is a preferred VOI basic type for real-valued coordinates and sizes.

typedef std::valarray<float>* i3d::PointerVector3d
typedef Vector3d<float> i3d::Offset

data type representing real coordinates (with floating point)

typedef Vector3d<int> i3d::Coords

data type representing coordinates without floating point


Enumeration Type Documentation

enum with definition of METAIO types

Enumerator:
MET_NONE 
MET_ASCII_CHAR 
MET_CHAR 
MET_UCHAR 
MET_SHORT 
MET_USHORT 
MET_INT 
MET_UINT 
MET_LONG 
MET_ULONG 
MET_FLOAT 
MET_DOUBLE 
MET_STRING 
MET_CHAR_ARRAY 
MET_UCHAR_ARRAY 
MET_SHORT_ARRAY 
MET_USHORT_ARRAY 
MET_INT_ARRAY 
MET_UINT_ARRAY 
MET_FLOAT_ARRAY 
MET_DOUBLE_ARRAY 
MET_FLOAT_MATRIX 
MET_OTHER 
Enumerator:
TGAColormap 
TGARGB 
TGAGray 
TGALEColormap 
TGALERGB 
TGALEGray 

Function Documentation

template<class T >
I3D_CORE_EXPORT T i3d::ColorInversion ( const T &  v)

Color inversion.

This template does color inversion (complementation) of the input value. Maximal value of the datatype is used for the complementation.

Todo:
fix color inversion of RGB types. Current implementation rely on a functional numeric_limits< RGB<T> > that are, however, not currently available.
template<>
I3D_CORE_EXPORT bool i3d::ColorInversion ( const bool &  v)
template I3D_CORE_EXPORT GRAY8 i3d::ColorInversion ( const GRAY8 &  )
template I3D_CORE_EXPORT GRAY16 i3d::ColorInversion ( const GRAY16 &  )
template I3D_CORE_EXPORT RGB16 i3d::ColorInversion ( const RGB &  )
template I3D_CORE_EXPORT float i3d::ColorInversion ( const float &  )
I3D_CORE_EXPORT std::ostream & i3d::operator<< ( std::ostream &  o,
const IOException &  e 
)

Output operator for IOException.

It writes information about the exception e into the output stream o.

Returns:
The modified stream.
I3D_CORE_EXPORT std::ostream & i3d::operator<< ( std::ostream &  o,
const InternalException &  e 
)

Output operator for InternalException.

It writes information about the exception e into the output stream o.

Returns:
The modified stream.
template<class T >
bool i3d::operator== ( const RGB_generic< T > &  x,
const RGB_generic< T > &  y 
) [inline]

Equality operator.

Returns:
true if all three components are the same, false otherwise
template<class T >
bool i3d::operator!= ( const RGB_generic< T > &  x,
const RGB_generic< T > &  y 
) [inline]

Inequality operator.

Returns:
true if at least one component in x differs from the corresponding component in y, false otherwise
template<class T >
RGB_generic<T> i3d::operator+ ( const RGB_generic< T > &  x,
const RGB_generic< T > &  y 
)

Sumation operator.

Sums two RGB values.

template<class T >
RGB_generic<T> i3d::operator- ( const RGB_generic< T > &  x,
const RGB_generic< T > &  y 
)

Subtraction operator.

Subtracts two RGB values.

template<class T >
bool i3d::operator< ( const RGB_generic< T > &  x,
const RGB_generic< T > &  y 
) [inline]

Comparison operators.

Compares two RGB values component-wise.

template<class T >
bool i3d::operator<= ( const RGB_generic< T > &  x,
const RGB_generic< T > &  y 
) [inline]
template<class T >
bool i3d::operator> ( const RGB_generic< T > &  x,
const RGB_generic< T > &  y 
) [inline]
template<class T >
bool i3d::operator>= ( const RGB_generic< T > &  x,
const RGB_generic< T > &  y 
) [inline]
template<class T >
RGB_generic<T> i3d::min ( const RGB_generic< T > &  x,
const RGB_generic< T > &  y 
) [inline]

Minimum operator.

template<class T >
RGB_generic<T> i3d::max ( const RGB_generic< T > &  x,
const RGB_generic< T > &  y 
) [inline]

Maximum operator.

bool i3d::i3dAssertFn ( const char *  expression,
const char *  description,
const char *  file,
const char *  function,
int  line,
int *  hit,
int  behavior 
) [inline]

Handles various asserts, should not be used directly but through the macros defined below.

Parameters:
[in]expressionexpression used for the asserion
[in]descriptionadditional description of the situation, can be NULL
[in]filefile where the assertion takes place
[in]functionfunction where the assertion takes place
[in]lineline where the assertion takes place
[in,out]hithow many times should this assertion be checked - 0 means do not check, -1 or NULL pointer means always, or use positive integer that will be decreased
[in]behaviorbehavior of the assertion - 0 means return a value whether to break the execution, 1 means throw an internal exception, 2 means throw an IO exception
Returns:
whether to break the execution or not
I3D_CORE_EXPORT std::gslice i3d::VOItoGslice ( const VOI< UPIXELS > &  voi,
const Vector3d< size_t > &  imgsize 
)

Convertion of VOI to std::gslice.

Function creates std::gslice that describes the same set of voxels as voi in an image with size imgsize. No checks are done, therefore the returned gslice can address voxels outside the image.

void i3d::NOTIMPLFORCOMPLEX ( void  )
template<class FULL_COLOR , class GRAY_CHANNEL >
I3D_CORE_EXPORT bool i3d::CopyChannel ( const Image3d< FULL_COLOR > &  rgb,
Image3d< GRAY_CHANNEL > &  gray,
int  channel 
)

Copy channel (red...

0, green...1, blue...2) from RGB image into grayscale images return false if channel is not 0, 1, or 2

template<class GRAY_CHANNEL , class FULL_COLOR >
I3D_CORE_EXPORT bool i3d::CopyChannelBack ( const Image3d< GRAY_CHANNEL > &  gray,
Image3d< FULL_COLOR > &  rgb,
int  channel 
)
template<class VOXELIN , class VOXELOUT >
I3D_CORE_EXPORT void i3d::FloatToGray ( const Image3d< VOXELIN > &  fimg,
Image3d< VOXELOUT > &  gimg 
)
template<class VOXELIN , class VOXELOUT >
I3D_CORE_EXPORT void i3d::FloatToGrayNoWeight ( const Image3d< VOXELIN > &  fimg,
Image3d< VOXELOUT > &  gimg 
)
template<class VOXELIN , class VOXELOUT >
I3D_CORE_EXPORT void i3d::GrayToFloat ( const Image3d< VOXELIN > &  gimg,
Image3d< VOXELOUT > &  fimg 
)
template<class VOXELIN , class VOXELOUT >
I3D_CORE_EXPORT void i3d::GrayToFloatNormalized ( const Image3d< VOXELIN > &  gimg,
Image3d< VOXELOUT > &  fimg 
)
template I3D_CORE_EXPORT void i3d::FloatToGray ( const Image3d< float > &  fimg,
Image3d< GRAY8 > &  gimg 
)
template I3D_CORE_EXPORT void i3d::FloatToGray ( const Image3d< float > &  fimg,
Image3d< GRAY16 > &  gimg 
)
template I3D_CORE_EXPORT void i3d::FloatToGray ( const Image3d< double > &  fimg,
Image3d< GRAY8 > &  gimg 
)
template I3D_CORE_EXPORT void i3d::FloatToGray ( const Image3d< double > &  fimg,
Image3d< GRAY16 > &  gimg 
)
template I3D_CORE_EXPORT void i3d::FloatToGrayNoWeight ( const Image3d< float > &  fimg,
Image3d< GRAY8 > &  gimg 
)
template I3D_CORE_EXPORT void i3d::FloatToGrayNoWeight ( const Image3d< float > &  fimg,
Image3d< GRAY16 > &  gimg 
)
template I3D_CORE_EXPORT void i3d::FloatToGrayNoWeight ( const Image3d< double > &  fimg,
Image3d< GRAY8 > &  gimg 
)
template I3D_CORE_EXPORT void i3d::FloatToGrayNoWeight ( const Image3d< double > &  fimg,
Image3d< GRAY16 > &  gimg 
)
template I3D_CORE_EXPORT void i3d::GrayToFloat ( const Image3d< GRAY8 > &  gimg,
Image3d< float > &  fimg 
)
template I3D_CORE_EXPORT void i3d::GrayToFloat ( const Image3d< GRAY8 > &  gimg,
Image3d< double > &  fimg 
)
template I3D_CORE_EXPORT void i3d::GrayToFloat ( const Image3d< GRAY16 > &  gimg,
Image3d< float > &  fimg 
)
template I3D_CORE_EXPORT void i3d::GrayToFloat ( const Image3d< GRAY16 > &  gimg,
Image3d< double > &  fimg 
)
template I3D_CORE_EXPORT void i3d::GrayToFloatNormalized ( const Image3d< GRAY8 > &  gimg,
Image3d< float > &  fimg 
)
template I3D_CORE_EXPORT void i3d::GrayToFloatNormalized ( const Image3d< GRAY8 > &  gimg,
Image3d< double > &  fimg 
)
template I3D_CORE_EXPORT void i3d::GrayToFloatNormalized ( const Image3d< GRAY16 > &  gimg,
Image3d< float > &  fimg 
)
template I3D_CORE_EXPORT void i3d::GrayToFloatNormalized ( const Image3d< GRAY16 > &  gimg,
Image3d< double > &  fimg 
)
template<class VOXEL >
I3D_CORE_EXPORT void i3d::BinaryToScalar ( const Image3d< bool > &  bimg,
Image3d< VOXEL > &  simg 
)

works for GRAY8, GRAY16, float, and double

template<class VOXEL >
I3D_CORE_EXPORT void i3d::GrayToBinary ( const Image3d< VOXEL > &  gimg,
Image3d< bool > &  bimg 
)

works for GRAY8 and GRAY16

template I3D_CORE_EXPORT void i3d::BinaryToScalar ( const Image3d< bool > &  ,
Image3d< GRAY8 > &   
)
template I3D_CORE_EXPORT void i3d::BinaryToScalar ( const Image3d< bool > &  ,
Image3d< GRAY16 > &   
)
template I3D_CORE_EXPORT void i3d::BinaryToScalar ( const Image3d< bool > &  ,
Image3d< float > &   
)
template I3D_CORE_EXPORT void i3d::BinaryToScalar ( const Image3d< bool > &  ,
Image3d< double > &   
)
template I3D_CORE_EXPORT void i3d::GrayToBinary ( const Image3d< GRAY8 > &  ,
Image3d< bool > &   
)
template I3D_CORE_EXPORT void i3d::GrayToBinary ( const Image3d< GRAY16 > &  ,
Image3d< bool > &   
)
template<class FULL_COLOR , class GRAY_CHANNEL >
void i3d::RGBtoGray ( const Image3d< FULL_COLOR > &  rgb,
Image3d< GRAY_CHANNEL > &  red,
Image3d< GRAY_CHANNEL > &  green,
Image3d< GRAY_CHANNEL > &  blue 
)
template<class GRAY_CHANNEL , class FULL_COLOR >
void i3d::GrayToRGB ( const Image3d< GRAY_CHANNEL > &  red,
const Image3d< GRAY_CHANNEL > &  green,
const Image3d< GRAY_CHANNEL > &  blue,
Image3d< FULL_COLOR > &  rgb 
)
template I3D_CORE_EXPORT void i3d::RGBtoGray< RGB, GRAY8 > ( const Image3d< RGB > &  ,
Image3d< GRAY8 > &  ,
Image3d< GRAY8 > &  ,
Image3d< GRAY8 > &   
)
template I3D_CORE_EXPORT void i3d::RGBtoGray< RGB16, GRAY16 > ( const Image3d< RGB16 > &  ,
Image3d< GRAY16 > &  ,
Image3d< GRAY16 > &  ,
Image3d< GRAY16 > &   
)
template I3D_CORE_EXPORT bool i3d::CopyChannelBack< GRAY8, RGB > ( const Image3d< GRAY8 > &  ,
Image3d< RGB > &  ,
int  channel 
)
template I3D_CORE_EXPORT bool i3d::CopyChannelBack< GRAY16, RGB16 > ( const Image3d< GRAY16 > &  ,
Image3d< RGB16 > &  ,
int  channel 
)
template I3D_CORE_EXPORT bool i3d::CopyChannel< RGB, GRAY8 > ( const Image3d< RGB > &  ,
Image3d< GRAY8 > &  ,
int  channel 
)
template I3D_CORE_EXPORT bool i3d::CopyChannel< RGB16, GRAY16 > ( const Image3d< RGB16 > &  ,
Image3d< GRAY16 > &  ,
int  channel 
)
template I3D_CORE_EXPORT void i3d::GrayToRGB< GRAY8, RGB > ( const Image3d< GRAY8 > &  ,
const Image3d< GRAY8 > &  ,
const Image3d< GRAY8 > &  ,
Image3d< RGB > &   
)
template I3D_CORE_EXPORT void i3d::GrayToRGB< GRAY16, RGB16 > ( const Image3d< GRAY16 > &  ,
const Image3d< GRAY16 > &  ,
const Image3d< GRAY16 > &  ,
Image3d< RGB16 > &   
)
template<class VOXEL >
I3D_CORE_EXPORT void i3d::GenerateDummyVoxels ( const Image3d< VOXEL > &  ImgIn,
Image3d< VOXEL > &  ImgOut,
VOXEL  Value,
const Vector3d< size_t > &  width 
)

Add a boundary to the image.

The width of the boundary (in each axis) is defined by the parameter width

template I3D_CORE_EXPORT void i3d::GenerateDummyVoxels ( const Image3d< GRAY8 > &  ImgIn,
Image3d< GRAY8 > &  ImgOut,
GRAY8  Value,
const Vector3d< size_t > &  width 
)
template I3D_CORE_EXPORT void i3d::GenerateDummyVoxels ( const Image3d< GRAY16 > &  ImgIn,
Image3d< GRAY16 > &  ImgOut,
GRAY16  Value,
const Vector3d< size_t > &  width 
)
template I3D_CORE_EXPORT void i3d::GenerateDummyVoxels ( const Image3d< float > &  ImgIn,
Image3d< float > &  ImgOut,
float  Value,
const Vector3d< size_t > &  width 
)
size_t i3d::GetIndex ( size_t  x,
size_t  y,
size_t  z,
const Vector3d< size_t > &  imgsize 
) [inline]
size_t i3d::GetIndex ( const Vector3d< size_t > &  coord,
const Vector3d< size_t > &  imgsize 
) [inline]
template<class FULL_COLOR , class COLOR_CHANNEL >
I3D_CORE_EXPORT void i3d::RGBtoGray ( const Image3d< FULL_COLOR > &  ,
Image3d< COLOR_CHANNEL > &  red,
Image3d< COLOR_CHANNEL > &  green,
Image3d< COLOR_CHANNEL > &  blue 
)

Convert a RGB image into a tripple of grayscale images:

template<class COLOR_CHANNEL , class FULL_COLOR >
I3D_CORE_EXPORT void i3d::GrayToRGB ( const Image3d< COLOR_CHANNEL > &  red,
const Image3d< COLOR_CHANNEL > &  green,
const Image3d< COLOR_CHANNEL > &  blue,
Image3d< FULL_COLOR > &  rgb 
)

Convert a tripple of grayscale images into a RGB image :

template<class T >
bool i3d::MicronsToImagePixels ( const Vector3d< float > &  v_mic,
const Image3d< T > &  img,
Vector3d< size_t > &  v_pix 
) [inline]

Convert vector in microns to vector in pixels in given image space.

Returns false if the vector is outside the image VOI

const size_t i3d::TableSize ( sizeof(ImgFormat)/sizeof(ImgFormatsTable)  )
string i3d::UpperCase ( string  s)
bool i3d::ReadConfig ( const char *  fname,
std::map< std::string, std::string > &  items,
const char  sep 
)

Reads text config file fname and returns map of configuration options (i.e.

pairs <key>, <val>):

Blank lines are skipped. From each non-blank line in file fn the pair <key>,<val> is constructed as follows:

  • string before the first occurence of <sep> is trimmed and supposed to be <key>
  • string after the first occurence of <sep> is trimmed and supposed to be <val>

IOException is thrown if there is no non-blank character before <sep> (i.e. unspecified keyword)

if the same keyword is used more then ones in the config file, the last value is set.

bool i3d::SaveConfig ( const char *  fname,
const std::map< std::string, std::string > &  items,
const char  sep = '=' 
)

Saves map into config file fname each pair on one line in form <key><sep><val>

void i3d::IcsError2IOException ( Ics_Error  retval)
bool i3d::IsRGB ( char *  str)
ImgVoxelType i3d::METAIOTypeToImgVoxelType ( int  channels,
METAIOType  in 
)
METAIOType i3d::ImgVoxelTypeToMETAIOType ( int &  channels,
ImgVoxelType  in 
)
METAIOType i3d::StrToMETAIOType ( const std::string &  s)
std::string i3d::METAIOTypeToStr ( const METAIOType  in)
void i3d::ReadInt ( std::string &  s,
int &  i,
int  def,
std::string  errormsg 
)
void i3d::ReadFloat ( std::string &  s,
float &  i,
float  def,
std::string  errormsg 
)
unsigned short i3d::ByteOrderSwapShort ( unsigned short  x) [inline]
unsigned long i3d::ByteOrderSwapLong ( unsigned long  x) [inline]
double i3d::ByteOrderSwap8 ( double  x)
void i3d::SwapByteOrder ( ImgVoxelType  ElementType,
void *  data,
size_t  size 
)
bool i3d::CompareByteOrder ( bool  ByteOrderMSB)
void i3d::swapRB ( RGB *  voxel) [inline]
template<class T >
static long i3d::writePixels ( FILE *  fd,
T *  data,
size_t  n,
bool  isRGB 
) [inline, static]
template<class T >
static void i3d::flushRaw ( FILE *  fd,
const T *  from,
size_t  rlen,
bool  isRGB 
) [inline, static]
template<class T >
static void i3d::flushCompressed ( FILE *  fd,
const T *  from,
size_t  clen,
bool  isRGB 
) [inline, static]
static void i3d::_XTIFFDefaultDirectory ( TIFF tif) [static]
static void i3d::_XTIFFInitialize ( void  ) [static]
void i3d::PixelUnpacking ( unsigned char  PackedByte,
bool *  Unpacked,
unsigned  count = CHAR_BIT 
)
void i3d::PixelPacking ( const bool *  Unpacked,
unsigned char &  PackedByte,
unsigned  count = CHAR_BIT 
)
template I3D_CORE_EXPORT Vector3d<float> i3d::PixelsToMicrons ( const Vector3d< PIXELS::T_offset > &  v,
const Resolution &  r 
)
template I3D_CORE_EXPORT Vector3d<float> i3d::PixelsToMicrons ( const Vector3d< PIXELS::T_size > &  v,
const Resolution &  r 
)
const Vector3d<float> i3d::DefaultResolution ( 10  ,
10  ,
10   
)

Default resolution.

This resolution is used in library functions if an image has undefined resolution.

Vector3d<PIXELS::T_offset> i3d::MicronsToPixels ( const Vector3d< float > &  v,
const Resolution &  r 
) [inline]

Convert vector in microns to a vector in pixels using the given resolution.

If the resolution is not defined, default resolution is used.

template<class T >
I3D_CORE_EXPORT Vector3d<float> i3d::PixelsToMicrons ( const Vector3d< T > &  v,
const Resolution &  r 
) [inline]

Convert vector in pixels to a vector in microns using the given resolution.

If the resolution is not defined, default resolution is used.

I3D_CORE_EXPORT std::string i3d::itos ( int  n)

Int to string conversion.

Write integer value to a string.

I3D_CORE_EXPORT bool i3d::StrToInt ( const std::string &  s,
int &  i 
)

String to int conversion.

Convert string to an integer value.

Returns:
true on success
I3D_CORE_EXPORT bool i3d::StrToFloat ( const std::string &  s,
float &  f 
)

String to float conversion.

Convert string to a float value.

Returns:
true on success
I3D_CORE_EXPORT void i3d::Tokenize ( const std::string &  str,
std::vector< std::string > &  tokens,
const std::string &  delimiters = " " 
)

Split a string to the vector of tokens.

I3D_CORE_EXPORT std::string i3d::Trim ( const std::string &  s)
Returns:
string without leading and tailing whitespaces
I3D_CORE_EXPORT std::string i3d::AfterLast ( const std::string &  s,
char  sep 
)
Returns:
string after last occurence of sep. If sep is not found, "" is returned
I3D_CORE_EXPORT std::string i3d::BeforeLast ( const std::string &  s,
char  sep 
)
Returns:
string before last occurence of sep. If sep is not found, "" is returned
I3D_CORE_EXPORT int i3d::cmp_nocase ( const std::string &  s1,
const std::string &  s2 
)

No case string comparison.

Returns:
-1 if s1 < s2
1 if s1 > s2
0 if s1 == s2.
template<class T >
I3D_CORE_EXPORT size_t i3d::num_digits ( number,
int  base = 10 
)
Returns:
number of digits of number in specified base if number==0 then 1 is returned
template I3D_CORE_EXPORT size_t i3d::num_digits ( int  number,
int  base 
)
template I3D_CORE_EXPORT size_t i3d::num_digits ( size_t  number,
int  base 
)
I3D_CORE_EXPORT std::string i3d::human_readable ( double  number,
unsigned  precision = 2 
)
Returns:
the given number formatted in human readable code
I3D_CORE_EXPORT std::string i3d::human_readable ( unsigned long long  number)
Returns:
the given number formatted in human readable code

The function returns the number of available processros/cores.

I3D_CORE_EXPORT unsigned long long i3d::GetFreeMemory ( )

The function returns the amount of all available memory.

I3D_CORE_EXPORT unsigned long long i3d::GetTotalMemory ( )

The function returns the amount of all physical memory (RAM).

I3D_CORE_EXPORT void i3d::GetExtension ( const string &  fn,
string &  ext 
)

Returns the extension of given filename.

I3D_CORE_EXPORT void i3d::GetPath ( const std::string &  fn,
std::string &  path 
)

Returns the path part of given filename - i.e.

the string before and including the last slash. Both types of slashes are accepted as path deliminators.

I3D_CORE_EXPORT void i3d::SplitFilename ( const string &  fn,
string &  path,
string &  name,
string &  ext 
)

Splits filename fn using functions above, name is string between last dot and last slash.

I3D_CORE_EXPORT std::string i3d::GetDir ( )

Get current working directory.

Exceptions:
IOExceptionif there is a problem.
I3D_CORE_EXPORT void i3d::SetDir ( const char *  dir)

Set working directory.

size_t i3d::ScanDir ( const char *  dir,
const char *  fnames,
FileList &  namelist,
int  regflags = REG_EXTENDED | REG_NOSUB 
)

Scanning of a directory.

Scan directory dir for files matching regular expression fnames. Filenames are returned in vector namelist and can be unsorted. Type of regular experssion is specified by regflags (see regcomp(3) for more info).

Returns:
Number of matching files on success.
Exceptions:
IOExceptionif regular expression cannot be parsed or directory scanned.
size_t i3d::MaskExpand ( const char *  mask,
FileList &  namelist,
bool  expand = true 
)
Todo:
Documentation
I3D_CORE_EXPORT void i3d::SetBadIOException ( std::ios &  io)

Set a stream to throw ios::failure after an unsuccessful IO operation.

I3D_CORE_EXPORT unsigned long i3d::LSBFirstReadLong ( std::istream &  file)

Read 4 bytes in least-significant byte first order into a long.

I3D_CORE_EXPORT void i3d::LSBFirstWriteLong ( std::ostream &  file,
unsigned long  value 
)

Write a long value as 4 bytes in the least-significant byte first order.

I3D_CORE_EXPORT unsigned short i3d::LSBFirstReadShort ( std::istream &  file)

Read 2 bytes in least-significant byte first order into a short int.

I3D_CORE_EXPORT void i3d::LSBFirstWriteShort ( std::ostream &  file,
unsigned short  value 
)

Write a short int as 2 bytes in least-significant byte first order.

I3D_CORE_EXPORT unsigned long i3d::LSBFirstToLong ( byte  buf[4])

Convert 4 bytes in least-significant byte first order into a long int.

I3D_CORE_EXPORT void i3d::LongToLSBFirst ( byte  buf[4],
unsigned long  value 
)

Convert a long int into 4 bytes in least-significant byte first order.

I3D_CORE_EXPORT unsigned short i3d::LSBFirstToShort ( byte  buf[2])

Convert 2 bytes in least-significant byte first order into a short int.

I3D_CORE_EXPORT void i3d::ShortToLSBFirst ( byte  buf[2],
unsigned short  value 
)

Convert a short int into 2 bytes in least-significant byte first order.

template<class T >
I3D_CORE_EXPORT void i3d::SwapVert ( size_t  width,
size_t  height,
T *  data 
)

Changes the order of lines in the memory.

template I3D_CORE_EXPORT void i3d::SwapVert ( size_t  ,
size_t  ,
bool *   
)
template I3D_CORE_EXPORT void i3d::SwapVert ( size_t  ,
size_t  ,
GRAY8 *   
)
template I3D_CORE_EXPORT void i3d::SwapVert ( size_t  ,
size_t  ,
RGB *   
)
template I3D_CORE_EXPORT void i3d::SwapVert ( size_t  ,
size_t  ,
GRAY16 *   
)
template I3D_CORE_EXPORT void i3d::SwapVert ( size_t  ,
size_t  ,
float *   
)
template I3D_CORE_EXPORT void i3d::SwapVert ( size_t  ,
size_t  ,
double *   
)
template I3D_CORE_EXPORT void i3d::SwapVert ( size_t  ,
size_t  ,
size_t *   
)
template I3D_CORE_EXPORT void i3d::SwapVert ( size_t  ,
size_t  ,
int *   
)
template I3D_CORE_EXPORT void i3d::SwapVert ( size_t  ,
size_t  ,
Vector3d< double > *   
)
template I3D_CORE_EXPORT void i3d::SwapVert ( size_t  ,
size_t  ,
Vector3d< float > *   
)
template I3D_CORE_EXPORT void i3d::SwapVert ( size_t  ,
size_t  ,
std::complex< float > *   
)
template I3D_CORE_EXPORT void i3d::SwapVert ( size_t  ,
size_t  ,
std::complex< double > *   
)
template<class T >
I3D_CORE_EXPORT void i3d::SwapHoriz ( size_t  width,
size_t  height,
T *  data 
)

Changes the order of columns in the memory.

template I3D_CORE_EXPORT void i3d::SwapHoriz ( size_t  ,
size_t  ,
bool *   
)
template I3D_CORE_EXPORT void i3d::SwapHoriz ( size_t  ,
size_t  ,
GRAY8 *   
)
template I3D_CORE_EXPORT void i3d::SwapHoriz ( size_t  ,
size_t  ,
RGB *   
)
template I3D_CORE_EXPORT void i3d::SwapHoriz ( size_t  ,
size_t  ,
GRAY16 *   
)
template I3D_CORE_EXPORT void i3d::SwapHoriz ( size_t  ,
size_t  ,
float *   
)
template I3D_CORE_EXPORT void i3d::SwapHoriz ( size_t  ,
size_t  ,
double *   
)
template I3D_CORE_EXPORT void i3d::SwapHoriz ( size_t  ,
size_t  ,
size_t *   
)
template I3D_CORE_EXPORT void i3d::SwapHoriz ( size_t  ,
size_t  ,
int *   
)
template I3D_CORE_EXPORT void i3d::SwapHoriz ( size_t  ,
size_t  ,
Vector3d< double > *   
)
template I3D_CORE_EXPORT void i3d::SwapHoriz ( size_t  ,
size_t  ,
Vector3d< float > *   
)
template I3D_CORE_EXPORT void i3d::SwapHoriz ( size_t  ,
size_t  ,
std::complex< double > *   
)
template I3D_CORE_EXPORT void i3d::SwapHoriz ( size_t  ,
size_t  ,
std::complex< float > *   
)
template<class T >
I3D_CORE_EXPORT void i3d::ReverseColors ( size_t  width,
size_t  height,
T *  data 
)

Reversing colors in image.

template void I3D_CORE_EXPORT i3d::ReverseColors ( size_t  ,
size_t  ,
bool *   
)
template void I3D_CORE_EXPORT i3d::ReverseColors ( size_t  ,
size_t  ,
GRAY8 *   
)
template void I3D_CORE_EXPORT i3d::ReverseColors ( size_t  ,
size_t  ,
RGB *   
)
template void I3D_CORE_EXPORT i3d::ReverseColors ( size_t  ,
size_t  ,
GRAY16 *   
)
template void I3D_CORE_EXPORT i3d::ReverseColors ( size_t  ,
size_t  ,
float *   
)
template<typename ITERATOR >
void i3d::normalize ( ITERATOR  first,
ITERATOR  last 
) [inline]

Normalization of containers.

This template divides values between iterators first (included) and last (excluded) by the sum of all values between these iterators.

template<typename ITERATOR >
void i3d::normalize ( ITERATOR  first,
const long int  count 
) [inline]

Normalization of containers.

It is equivalent to normalize(first, first + count).

template<class T >
I3D_CORE_EXPORT std::ostream & i3d::operator<< ( ostream &  os,
const Vector3d< T > &  v 
)
template<class T >
I3D_CORE_EXPORT std::istream & i3d::operator>> ( istream &  is,
Vector3d< T > &  v 
)
template I3D_CORE_EXPORT ostream& i3d::operator<< ( ostream &  ,
const Vector3d< int > &   
)
template I3D_CORE_EXPORT ostream& i3d::operator<< ( ostream &  ,
const Vector3d< size_t > &   
)
template I3D_CORE_EXPORT ostream& i3d::operator<< ( ostream &  ,
const Vector3d< long > &   
)
template I3D_CORE_EXPORT ostream& i3d::operator<< ( ostream &  ,
const Vector3d< float > &   
)
template I3D_CORE_EXPORT ostream& i3d::operator<< ( ostream &  ,
const Vector3d< double > &   
)
template I3D_CORE_EXPORT istream& i3d::operator>> ( istream &  ,
Vector3d< int > &   
)
template I3D_CORE_EXPORT istream& i3d::operator>> ( istream &  ,
Vector3d< size_t > &   
)
template I3D_CORE_EXPORT istream& i3d::operator>> ( istream &  ,
Vector3d< long > &   
)
template I3D_CORE_EXPORT istream& i3d::operator>> ( istream &  ,
Vector3d< float > &   
)
template I3D_CORE_EXPORT istream& i3d::operator>> ( istream &  ,
Vector3d< double > &   
)
template<class T >
T i3d::Norm ( const Vector3d< T > &  v)

Euclidean norm:

template<class T >
T i3d::Norm2 ( const Vector3d< T > &  v)

Square of euclidean norm.

template<class T >
T i3d::Dot ( const Vector3d< T > &  u,
const Vector3d< T > &  v 
)

Dot product.

template<class T >
Vector3d<T> i3d::Cross ( const Vector3d< T > &  u,
const Vector3d< T > &  v 
)

Cross product.

template<class T >
Vector3d<T> i3d::max ( const Vector3d< T > &  v1,
const Vector3d< T > &  v2 
)

minimum

template<class T >
Vector3d<T> i3d::min ( const Vector3d< T > &  v1,
const Vector3d< T > &  v2 
)

maximum

template<class T >
Vector3d<T> i3d::operator+ ( const Vector3d< T > &  v1,
const Vector3d< T > &  v2 
) [inline]
template<class T >
Vector3d<T> i3d::operator- ( const Vector3d< T > &  v1,
const Vector3d< T > &  v2 
) [inline]
template<class T >
Vector3d<T> i3d::operator* ( const Vector3d< T > &  v1,
const Vector3d< T > &  v2 
) [inline]
template<class T >
Vector3d<T> i3d::operator/ ( const Vector3d< T > &  v1,
const Vector3d< T > &  v2 
) [inline]
template<class T >
Vector3d<T> i3d::operator+ ( const Vector3d< T > &  v,
s 
) [inline]
template<class T >
Vector3d<T> i3d::operator- ( const Vector3d< T > &  v,
s 
) [inline]
template<class T >
Vector3d<T> i3d::operator* ( const Vector3d< T > &  v,
s 
) [inline]
template<class T >
Vector3d<T> i3d::operator/ ( const Vector3d< T > &  v,
s 
) [inline]
template<class T >
Vector3d<T> i3d::operator+ ( s,
const Vector3d< T > &  v 
) [inline]
template<class T >
Vector3d<T> i3d::operator- ( s,
const Vector3d< T > &  v 
) [inline]
template<class T >
Vector3d<T> i3d::operator* ( s,
const Vector3d< T > &  v 
) [inline]
template<class T >
Vector3d<T> i3d::operator/ ( s,
const Vector3d< T > &  v 
) [inline]
Vector3d<PIXELS::T_offset> i3d::operator+ ( const Vector3d< PIXELS::T_offset > &  v1,
const Vector3d< PIXELS::T_size > &  v2 
) [inline]

Addition for the case when offset to an opposite corner of some VOI is required.

That is when voi_variable<PIXELS>.offset + voi_variable<PIXELS>.size needs to be evaluated.

The other way round is to convert both i3d::PIXELS::T_offset and T_size, which are infact i3d::vectord3d<int> and i3d::vector3d<size_t>, to i3d::MICRONS::T_offset and T_size, respectively, using fixed resolution and pixel to microns conversion helper functions. They shall become i3d::vector3d<float> afterwards, sum them and convert the result back to PIXELS::T_offset.

template<class T >
Vector3d<T> i3d::abs ( const Vector3d< T > &  v) [inline]
template<class T >
bool i3d::operator== ( const Vector3d< T > &  v1,
const Vector3d< T > &  v2 
) [inline]
template<class T >
bool i3d::operator!= ( const Vector3d< T > &  v1,
const Vector3d< T > &  v2 
) [inline]
template<class T >
bool i3d::operator> ( const Vector3d< T > &  v1,
const Vector3d< T > &  v2 
) [inline]
template<class T >
bool i3d::operator< ( const Vector3d< T > &  v1,
const Vector3d< T > &  v2 
) [inline]
template<class T >
bool i3d::le ( const Vector3d< T > &  v1,
const Vector3d< T > &  v2 
) [inline]

Element-by-element partial ordering:

template<class T >
bool i3d::StrToVector3d ( const char *  from,
Vector3d< T > &  v 
) [inline]

Convert char * to Vector3d, returns true on success.

template<class C , class T >
T& i3d::GetRef ( Vector3d< T > &  v) [inline]
template<class C , class T >
T i3d::GetComp ( const Vector3d< T > &  v) [inline]
template<class UNIT >
bool i3d::operator== ( const VOI< UNIT > &  v1,
const VOI< UNIT > &  v2 
) [inline]

Equality operator.

Two VOIs are equal if they have the same offset as well as the same size.

template<class UNIT >
bool i3d::operator!= ( const VOI< UNIT > &  v1,
const VOI< UNIT > &  v2 
) [inline]

Inequality operator.

Two VOIs are different if they differ in at least one component of their offsets or sizes.

template<class UNIT >
VOI<UNIT> i3d::operator* ( const VOI< UNIT > &  v1,
const VOI< UNIT > &  v2 
) [inline]

Intersection operator.

Creates intersection of two VOIs.

template<class UNIT >
VOI<UNIT> i3d::operator+ ( const VOI< UNIT > &  v1,
const VOI< UNIT > &  v2 
) [inline]

Union operator.

Creates union of two VOIs.

template<class UNIT >
std::ostream& i3d::operator<< ( std::ostream &  os,
const VOI< UNIT > &  v 
) [inline]

Output operator.

Writes information about the VOI into the stream.

template<class UNIT >
bool i3d::InOO ( const VOI< UNIT > &  voi,
const Vector3d< typename UNIT::T_offset > &  point 
) [inline]

Is point inside VOI?

Returns:
true if voi.offset < point < voi.offset + voi.size.
false otherwise.
template<class UNIT >
bool i3d::InOC ( const VOI< UNIT > &  voi,
const Vector3d< typename UNIT::T_offset > &  point 
) [inline]

Is point inside VOI or on the right boundary?

Returns:
true if voi.offset < point <= voi.offset + voi.size.
false otherwise.
template<class UNIT >
bool i3d::InCO ( const VOI< UNIT > &  voi,
const Vector3d< typename UNIT::T_offset > &  point 
) [inline]

Is point inside VOI or on the left boundary?

Returns:
true if voi.offset <= point < voi.offset + voi.size.
false otherwise.
template<class UNIT >
bool i3d::InCC ( const VOI< UNIT > &  voi,
const Vector3d< typename UNIT::T_offset > &  point 
) [inline]

Is point inside VOI or on a boundary?

Returns:
true if voi.offset <= point <= voi.offset + voi.size.
false otherwise.

Variable Documentation

template class I3D_CORE_EXPORT i3d::Image3d< int >
template class I3D_CORE_EXPORT i3d::Image3d< size_t >
template class I3D_CORE_EXPORT i3d::Image3d< float >
template class I3D_CORE_EXPORT i3d::Image3d< double >
template class I3D_CORE_EXPORT i3d::Image3d< RGB >
template class I3D_CORE_EXPORT i3d::Image3d< GRAY8 >
template class I3D_CORE_EXPORT i3d::Image3d< bool >
template class I3D_CORE_EXPORT i3d::Image3d< GRAY16 >
template class I3D_CORE_EXPORT i3d::Image3d< RGB16 >
template class I3D_CORE_EXPORT i3d::Image3d< complex< float >>
template class I3D_CORE_EXPORT i3d::Image3d< complex< double >>
template class I3D_CORE_EXPORT i3d::Image3d< Vector3d< float >>
template class I3D_CORE_EXPORT i3d::Image3d< Vector3d< double >>
template class I3D_CORE_EXPORT i3d::VectField3d< float >
template class I3D_CORE_EXPORT i3d::VectField3d< double >
Initial value:
 
{
         {"micrometers", 1.0},
         {"microns", 1.0},
         {"um", 1.0},
         {"cm", 10000.0},
         {"mm", 1000.0},
         {"inch", 25400.0}
}
const size_t i3d::num_of_recognized_units = sizeof(units)/sizeof(T_units2microns)
Initial value:

const table to convert METAIOType to ImgVoxelType

Initial value:
 {
    {"MET_NONE",MET_OTHER},
    {"MET_ASCII_CHAR",MET_OTHER},
    {"MET_CHAR",MET_OTHER},
    {"MET_UCHAR",MET_UCHAR},
    {"MET_SHORT",MET_OTHER},
    {"MET_USHORT",MET_USHORT},
    {"MET_INT",MET_OTHER},
    {"MET_UINT",MET_OTHER},
    {"MET_LONG",MET_OTHER},
    {"MET_ULONG",MET_OTHER},
    {"MET_FLOAT",MET_FLOAT},
    {"MET_DOUBLE",MET_DOUBLE},
    {"MET_STRING",MET_OTHER},
    {"MET_CHAR_ARRAY",MET_OTHER},
    {"MET_UCHAR_ARRAY",MET_OTHER},
    {"MET_SHORT_ARRAY",MET_OTHER},
    {"MET_USHORT_ARRAY",MET_OTHER},
    {"MET_INT_ARRAY",MET_OTHER},
    {"MET_UINT_ARRAY",MET_OTHER},
    {"MET_FLOAT_ARRAY",MET_OTHER},
    {"MET_DOUBLE_ARRAY",MET_OTHER},
    {"MET_FLOAT_MATRIX",MET_OTHER},
    {"MET_OTHER",MET_OTHER}
}

const table to convert String to METAIOType

const int i3d::TGA_ATTRIB_ABITS = 0x0f

Targa attribue.

const int i3d::TGA_ATTRIB_HORIZONTAL = 0x10

Targa attribue - horizontal orientation.

const int i3d::TGA_ATTRIB_VERTICAL = 0x20

Targa attribue - vertical orientation.

const TIFFFieldInfo i3d::xtiffFieldInfo[] [static]
Initial value:
 {
    { 
                  I3DTAG_ZPOSITION, 1, 1, 
                  TIFF_RATIONAL, 
                  FIELD_CUSTOM, 0, 0, 
                  (char *)("ZPosition") 
         },
    { 
                  I3DTAG_ZRESOLUTION, 1, 1, 
                  TIFF_RATIONAL, 
                  FIELD_CUSTOM, 0, 0, 
                  (char*)("ZResolution") 
         }
  }
TIFFExtendProc i3d::_ParentExtender = NULL [static]
template I3D_CORE_EXPORT class i3d::VoxelConversion< int, GRAY8 >
template I3D_CORE_EXPORT class i3d::VoxelConversion< int, bool >
template I3D_CORE_EXPORT class i3d::VoxelConversion< int, float >
template I3D_CORE_EXPORT class i3d::VoxelConversion< float, GRAY8 >
template I3D_CORE_EXPORT class i3d::VoxelConversion< float, GRAY16 >
template I3D_CORE_EXPORT class i3d::VoxelConversion< float, bool >
template I3D_CORE_EXPORT class i3d::VoxelConversion< float, float >
template I3D_CORE_EXPORT class i3d::VoxelConversion< long double, GRAY8 >
template I3D_CORE_EXPORT class i3d::VoxelConversion< long double, GRAY16 >
template I3D_CORE_EXPORT class i3d::VoxelConversion< long double, bool >
template I3D_CORE_EXPORT class i3d::VoxelConversion< long double, float >
template struct I3D_CORE_EXPORT i3d::Vector3d< int >

Explicit instantiations:

template struct I3D_CORE_EXPORT i3d::Vector3d< size_t >
template struct I3D_CORE_EXPORT i3d::Vector3d< long >
template struct I3D_CORE_EXPORT i3d::Vector3d< float >
template struct I3D_CORE_EXPORT i3d::Vector3d< double >
template struct I3D_CORE_EXPORT i3d::VOI< PIXELS >
template struct I3D_CORE_EXPORT i3d::VOI< UPIXELS >
template struct I3D_CORE_EXPORT i3d::VOI< MICRONS >