Difference between revisions of "Mipmap Generator 3D Manual"
From Immersive Visualization Lab Wiki
(→File format) |
m (→Readers) |
||
(9 intermediate revisions by one user not shown) | |||
Line 10: | Line 10: | ||
===Description=== | ===Description=== | ||
---- | ---- | ||
− | + | :Please refer to [[Mipmap Generator 2D Manual]] | |
===Options=== | ===Options=== | ||
---- | ---- | ||
− | + | :Please refer to [[Mipmap Generator 2D Manual]] | |
===File format=== | ===File format=== | ||
---- | ---- | ||
====Mipmaps==== | ====Mipmaps==== | ||
+ | :Please refer to [[Mipmap Generator 2D Manual]] | ||
+ | |||
+ | ====Text Files==== | ||
+ | :'''1. Output text file and the output batch file (<u>outputBatchFilename</u>)''' | ||
+ | ::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): | ||
+ | <font color = "blue">'''# dimension, # volumes'''</font> | ||
+ | 3 2 | ||
+ | |||
+ | <font color = "blue">'''# Volume example1.xvf''' | ||
+ | # Volume definition (volume number, brick size, maximum mipmap level, # channel</font> | ||
+ | 0 128 2 3 | ||
+ | <font color = "blue"># mipmap level 0 definition (mipmap level, file name, size in X, size in Y, size in Z</font> | ||
+ | 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 | ||
+ | |||
+ | <font color = "blue">'''# Volume example2.xvf''' | ||
+ | # Volume definition (volume number, brick size, maximum mipmap level, # channel</font> | ||
+ | 0 128 2 3 | ||
+ | <font color = "blue"># mipmap level 0 definition (mipmap level, file name, size in X, size in Y, size in Z</font> | ||
+ | 0 /home/kushu/mipmapGen3D/example2.0.xvf 512 512 42 | ||
+ | …… | ||
+ | |||
+ | :'''2. Input batch file <u>inputBatchFilename</u>''' | ||
+ | ::Please refer to [[Mipmap Generator 2D Manual]] | ||
+ | |||
+ | ===Readers=== | ||
+ | ---- | ||
+ | :There are two C functions to access bricks in the mipmaps: | ||
+ | |||
+ | ::'''int getOneChannelData(int <u>x</u>, int <u>y</u>, int <u>z</u>, int <u>c</u>, unsigned char *<u>buf</u>);''' | ||
+ | :::Get all the pixels in c-th channel of brick (x, y, z), and put it in the buf | ||
+ | |||
+ | ::'''int getMultiChannelData(int <u>x</u>, int <u>y</u>, int <u>z</u>, unsigned char *<u>buf</u>);''' | ||
+ | :::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, z), 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 <u>buf</u> 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=== | ||
+ | ---- | ||
+ | |||
+ | [http://www.cse.ucsd.edu/~kuhsu/mipmapGen/downSampler3D.tar.gz downsampler 3D] | ||
+ | |||
+ | [http://www.cse.ucsd.edu/~kuhsu/mipmapGen/reader3D.tar.gz reader 3D] |
Latest revision as of 18:46, 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 getOneChannelData(int x, int y, int z, int c, unsigned char *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
- int getMultiChannelData(int x, int y, int z, unsigned char *buf);
- Readers access a brick with it’s coordinate (x, y, z), 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.