SMIL  0.8
 All Classes Functions Variables Groups Pages
IO
+ Collaboration diagram for IO:

Classes

class  Image< T >
 Main Image class. More...
 

Functions

string getHttpFile (const char *url)
 Download file data into a string buffer.
 
template<class T >
RES_T read (const char *filename, Image< T > &image)
 Read image file.
 
template<class T >
RES_T read (const vector< string > fileList, Image< T > &image)
 Read a stack of 2D images. More...
 
template<class T >
RES_T readRAW (const char *filename, size_t width, size_t height, size_t depth, Image< T > &image)
 RAW file read.
 
template<class T >
RES_T write (const Image< T > &image, const char *filename)
 Write image file.
 
template<class T >
RES_T write (const Image< T > &image, const vector< string > fileList)
 Write a 3D image as a stack of 2D images. More...
 
template<class T >
RES_T writeRAW (Image< T > &image, const char *filename)
 RAW file write.
 

Detailed Description

Function Documentation

RES_T read ( const vector< string >  fileList,
Image< T > &  image 
)

Read a stack of 2D images.

The output 3D image will have the width and height of the first (2D) image and the number of images for depth.

RES_T write ( const Image< T > &  image,
const vector< string >  fileList 
)

Write a 3D image as a stack of 2D images.

The file list must contain the same number of filenames as the 3D image depth.

Example:

1 im1 = Image("img3d.vtk")
2 fileNames = [ "img%d.png"%i for i in range(im1.getDepth()) ]
3 write(im1, fileNames)