Difference between revisions of "Mipmap Generator 3D Manual"

From Immersive Visualization Lab Wiki
Jump to: navigation, search
m (Version)
(Downloads)
Line 67: Line 67:
 
===Downloads===
 
===Downloads===
 
----
 
----
//coming soon~
+
 
 +
[http://www.cse.ucsd.edu/~kuhsu/mipmapGen/downSampler3D.tar.gz downsampler 3D]
 +
 
 +
[http://www.cse.ucsd.edu/~kuhsu/mipmapGen/reader3D.tar.gz reader 3D]

Revision as of 18:42, 8 April 2008

Generate mipmaps for 3D volumes.

The 3D generator is basically the same with the 2D one, except there's one more dimension for the z-value. In the 3D manual we'll just mention those parts different from 2D generator.

Contents

Synopsis


./MipmapGen3D [-f format -s brickSize] volumeFilename maxLevel
./MipmapGen3D [-f format -s brickSize] volumeBatchFilename maxLevel [outputBatchFilename]

Description


Please refer to Mipmap Generator 2D Manual

Options


Please refer to Mipmap Generator 2D Manual

File format


Mipmaps

Please refer to Mipmap Generator 2D Manual

Text Files

1. Output text file and the output batch file (outputBatchFilename)
In the 3D generator, the output text file and the output batch file are in the same format. The output text file first starts with a line specify the dimension of the input image/volume (2D or 3D) and the number of volumes listed in the file. Then for each volume, it listed the related information such as maxLevel and brickSize, and file path for all its output mipmaps.
Sample file (a line starts with ‘#’ is a comment line):
   # dimension, # volumes
   3 2

   # Volume example1.xvf
   # Volume definition (volume number, brick size, maximum mipmap level, # channel
   0 128 2 3
   # mipmap level 0 definition (mipmap level, file name, size in X, size in Y, size in Z
   0 /home/kushu/mipmapGen3D/example1.0.xvf 512 512 42
   1 /home/kushu/mipmapGen3D/example1.1.xvf 256 256 21
   2 /home/kushu/mipmapGen3D/example1.2.xvf 128 128 10

   # Volume example2.xvf
   # Volume definition (volume number, brick size, maximum mipmap level, # channel
   0 128 2 3
   # mipmap level 0 definition (mipmap level, file name, size in X, size in Y, size in Z
   0 /home/kushu/mipmapGen3D/example2.0.xvf 512 512 42
       ……
2. Input batch file inputBatchFilename
Please refer to Mipmap Generator 2D Manual

Readers


There are two C functions to access bricks in the mipmaps:
int getOneChannelData(int x, int y, int z, int c, unsigned char *buf);
Get all the pixels in c-th channel of brick (x, y, z), and put it in the buf
int getMultiChannelData(int x, int y, int z, unsigned char *buf);
Get all the pixels in all channel of brick (x, y, z), and put it in the buf
Readers access a brick with it’s coordinate (x, y), which starts from the upper-left-front corner of the volume.
Similarly, note that we don’t pad for the boundary bricks smaller than the brick size. So the user should be aware of the size change on the boundaries and allocate the buf appropriately.

Version


Current version only supports XVF volume. The input volume should be uncompressed. Only the data chunk of the first frame will be processed.

Downloads


downsampler 3D

reader 3D