Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

FileConversion.hpp File Reference

#include <ImLib3D/ImageProcessor.hpp>
#include <ImLib3D/FFT.hpp>
#include <ImLib3D/ConvenienceProcessors.hpp>
#include <avwio/avwio.h>

Include dependency graph for FileConversion.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  FileConversion
namespace  IP3D

Functions

string AVWImLib3DImageType (string fname)
template<class TTT>
short AVWType ()
template<>
short AVWType< byte > ()
template<>
short AVWType< short > ()
template<>
short AVWType< int > ()
template<>
short AVWType< float > ()
template<>
short AVWType< complex< double > > ()
template<>
short AVWType< double > ()
template<class ImageType>
void ImageFromRawData (const typename ImageType::value_type *data, const Size3D &size, string order, ImageType &res, bool reverseEndian=false)
template<class ImageType>
void RawDataFromImage (const ImageType &src, string order, typename ImageType::value_type **pres, bool reverseEndian=false)
template<class ImageType>
void WriteToFileAVW (const ImageType &src, const string &fname)
template<class ImageType>
void ReadFromFileAVW (const string &fname, ImageType &res)
void ReadFromFileBruker (const string &fname, int imageNumber, Image3Dlinear< short int > &res)
template<class ImageType>
void ExportImageSlice (const ImageType &src, int direction, int position, const string &fname, float rescale=1)


Detailed Description

Definition in file FileConversion.hpp.


Function Documentation

template<class ImageType>
void IP3D::ImageFromRawData const typename ImageType::value_type *  data,
const Size3D size,
string  order,
ImageType &  res,
bool  reverseEndian = false
 

#&ImageFromRawData&# Create an ImLib3D image from raw data. The image type determines the raw data type (for example Image3Df will assume data is float). The byte ordering in the raw data is given by a three letter string (ex."ZXY"). Example: imlib3d ImageFromRawData "Image3Dlinear<short int>" rare_cra.img 128 128 128 ZXY res.im3D true im ImageTypeConversion res.im3D res1.im3D Image3Df imlib3dview res1.im3D

Result typename type:ImageTypeName Raw data type:raw data Image size type:Size3D Raw data ordering type:string Result image type:ImageType ReverseEndian type:bool ~

Definition at line 92 of file FileConversion.hpp.

References Size3D::GetV(), Vect3D< Value, Real >::x, Vect3D< Value, Real >::y, and Vect3D< Value, Real >::z.

template<class ImageType>
void IP3D::RawDataFromImage const ImageType &  src,
string  order,
typename ImageType::value_type **  pres,
bool  reverseEndian = false
 

#&RawDataFromImage&# Create an raw binary data from an image. The image type determines the raw data type (for example Image3Df will assume data is float). The byte ordering in the raw data is given by a three letter string (ex."ZXY").

Source image type:ImageType Raw data ordering type:string Raw data type:data ReverseEndian type:bool ~

Definition at line 130 of file FileConversion.hpp.

References Vect3D< Value, Real >::x, Vect3D< Value, Real >::y, and Vect3D< Value, Real >::z.

template<class ImageType>
void IP3D::WriteToFileAVW const ImageType &  src,
const string &  fname
 

#&WriteToFileAVW&# Write an image in AVW/Analyze format.

Source image type:ImageType Filename Base type:string ~

Definition at line 167 of file FileConversion.hpp.

template<class ImageType>
void IP3D::ReadFromFileAVW const string &  fname,
ImageType &  res
 

#&ReadFromFileAVW&# Read an image in AVW/Analyze format.

Filename Base type:string Image type:ImageType ~

Definition at line 195 of file FileConversion.hpp.

void IP3D::ReadFromFileBruker const string &  fname,
int  imageNumber,
Image3Dlinear< short int > &  res
 

#&ReadFromFileBruker&# Dirty hack for reading an image in brucker format. This probably wont work for you...

Filename Base type:string Image number type:int Image type:Image3Dlinear<short int> ~

template<class ImageType>
void IP3D::ExportImageSlice const ImageType &  src,
int  direction,
int  position,
const string &  fname,
float  rescale = 1
 

#&ExportImageSlice&# Save a slice of an image in ppm format Takes a slice in a given direction (0=yz 1=xy 2=xy) and position and saves it in ppm format. By default image values are scaled to fit in ppm range. rescale=0, specifies that no rescaling should be done. rescale between 0 and 1, specifies that rescaling should be done so that the specified portion of the image values fits into the ppm range. If rescale values are between -1 and 0, then rescaling is done using values of the whole image (not just the slice), this is usefull if you want extracting a series of slices from the same image and want all thes slices to have the same constrast. -.98 is generally good for medical images.

src type:ImageType direction type:int position type:int filename type:string rescale type:float ~

Definition at line 257 of file FileConversion.hpp.


Generated on Fri Jun 17 13:36:15 2005 for ImLib3D by  doxygen 1.4.2