int QccWAVSubbandPyramid3DIntInitialize(QccWAVSubbandPyramid3DInt
*subband_pyramid);
int QccWAVSubbandPyramid3DIntAlloc(QccWAVSubbandPyramid3DInt
*subband_pyramid);
void QccWAVSubbandPyramid3DIntFree(QccWAVSubbandPyramid3DInt
*subband_pyramid);
int QccWAVSubbandPyramid3DIntNumLevelsToNumSubbandsDyadic(int
num_levels);
int QccWAVSubbandPyramid3DIntNumLevelsToNumSubbandsPacket(int
temporal_num_levels, int spatial_num_levels);
int QccWAVSubbandPyramid3DIntNumSubbandsToNumLevelsDyadic(int
num_subbands);
int QccWAVSubbandPyramid3DIntCalcLevelFromSubbandDyadic(int
subband, int num_levels);
int QccWAVSubbandPyramid3DIntCalcLevelFromSubbandPacket(int
subband, int temporal_num_levels, int spatial_num_levels, int *temporal_level,
int *spatial_level);
int QccWAVSubbandPyramid3DIntSubbandSize(const QccWAVSubbandPyramid3DInt
*subband_pyramid, int subband, int *subband_num_frames, int *subband_num_rows,
int *subband_num_cols);
int QccWAVSubbandPyramid3DIntSubbandOffsets(const
QccWAVSubbandPyramid3DInt *subband_pyramid, int subband, int *frame_offset,
int *row_offset, int *col_offset);
int QccWAVSubbandPyramid3DIntPrint(const
QccWAVSubbandPyramid3DInt *subband_pyramid);
typedef struct
{
QccString filename;
QccString magic_num;
int major_version;
int minor_version;
int transform_type;
int temporal_num_levels;
int spatial_num_levels;
int num_frames;
int num_rows;
int num_cols;
int origin_frame;
int origin_row;
int origin_col;
int subsample_pattern_frame;
int subsample_pattern_row;
int subsample_pattern_col;
QccVolumeInt volume;
} QccWAVSubbandPyramid3DInt;
The fields of QccWAVSubbandPyramid3DInt are as follows:
The SBPTI file format consists of the following information:
where PTI is the magic number, X.X is the version number, <white space> is white space and/or comment lines, T is the transform type (either QCCWAVSUBBANDPYRAMID3DINT_DYADIC or QCCWAVSUBBANDPYRAMID3DINT_PACKET), L is the number of levels of temporal decomposition (not present if T is QCCWAVSUBBANDPYRAMID3DINT_PACKET), S is the number of levels of spatial decomposition, C is the number of columns of the subband-pyramid image cube, R is the number of rows, F is the number of frames, and ikmn is the coefficient for the kth frame, mth row, nth column of the subband-pyramid image cube. T, L, S, C, R, and F are stored in ASCII. The image cube itself, ikmn, is stored as binary int numbers (4 bytes each, MSB first, see QccFileWriteInt(3) ). The values of L and S give the number of decompositions in the volume of coefficients. If S = 0, (and L = 0 for a wavelet-packet decomposition), the image cube has not been decomposed.SBPTIX.X
<white space>
T
[L] S
C R F
i111 i112...
i121 i122...
i211 i212...
.
.
.
filename: NULL string
magic_num: QCCSUBBANDPYRAMID3DINT_MAGICNUM
major_version, minor_version: initialized to output of QccGetQccPackVersion(3)
transform_type: QCCWAVSUBBANDPYRAMID3DINT_PACKET
temporal_num_levels: 0
spatial_num_levels: 0
num_frames: 0
num_rows: 0
num_cols: 0
origin_frame 0
origin_row 0
origin_col 0
subsample_pattern_frame: 0
subsample_pattern_row: 0
subsample_pattern_col: 0
volume: NULL
QccWAVSubbandPyramid3DIntAlloc() allocates storage space for subband_pyramid->volume. If subband_pyramid->volume is not NULL, QccWAVSubbandPyramid3DIntAlloc() returns immediately without changing the state of any memory allocation. Otherwise, the subband_pyramid->volume array is allocated. The fields subband_pyramid->num_frames, subband_pyramid->num_rows, and subband_pyramid->num_cols must be set prior to calling QccWAVSubbandPyramid3DIntAlloc().
QccWAVSubbandPyramid3DIntFree() frees the subband_pyramid->volume array previously allocated by QccWAVSubbandPyramid3DIntAlloc().
QccWAVSubbandPyramid3DIntNumLevelsToNumSubbandsDyadic() calculates the number of subbands in a dyadic subband pyramid with num_levels levels. This value is num_levels * 7 + 1.
QccWAVSubbandPyramid3DIntNumLevelsToNumSubbandsPacket() calculates the number of subbands in a wavelet-packet subband pyramid with temporal_num_levels temporal levels and spatial_num_levels spatial levels. This value is QccWAVSubbandPyramidNumLevelsToNumSubbands( spatial_num_levels) * temporal_num_levels + 1.
QccWAVSubbandPyramid3DIntNumSubbandsToNumLevelsDyadic() calculates the number of levels in a dyadic subband pyramid with num_subbands subbands.
QccWAVSubbandPyramid3DIntCalcLevelFromSubbandDyadic() calculates the level of the specified subband in a dyadic subband pyramid with num_levels levels. Here, subband gives the subband number of the subband in the pyramid.
QccWAVSubbandPyramid3DIntCalcLevelFromSubbandPacket() calculates the levels of the specified subband in a wavelet-packet subband pyramid with temporal_num_levels temporal levels and spatial_num_levels spatial levels. Here, subband gives the subband number of the subband in the pyramid. The temporal level of the specified subband is returned in temporal_level while the spatial level of the subband is returned in spatial_level.
QccWAVSubbandPyramid3DIntSubbandSize() calculates the size of the specified subband in subband_pyramid. The size of the subband is returned in subband_num_frames, subband_num_rows, and subband_num_cols, which must be allocated prior to calling QccWAVSubbandPyramid3DIntSubbandSize().
QccWAVSubbandPyramid3DIntSubbandOffsets() calculates the location in subband_pyramid->volume of the specified subband. The frame, row, and column offsets are returned in frame_offset, row_offset, and col_offset, respectively, which must be allocated prior to calling QccWAVSubbandPyramid3DIntSubbandOffsets().
QccWAVSubbandPyramid3DIntPrint() prints the contents of subband_pyramid to stdout.
A. R. Calderbank, I. Daubechies, W. Sweldens, B.-L. Yeo, "Lossless Image Compression Using Integer to Integer Wavelet Transforms", in Proceedings of the International Conference on Image Processing, Lausanne, Switzerland, pp. 596-599, September 1997.
Z. Xiong, X. Wu, S. Cheng, J. Hua, "Lossy-to-Lossless Compression of Medical Volumetric Data Using Three-Dimensional Integer Wavelet Transforms," IEEE Transactions on Medical Imaging, vol. 22, pp. 459-470, March 2003.
B.-J. Kim, Z. Xiong, and W. A. Pearlman, "Low Bit-Rate Scalable Video Coding with 3-D Set Partitioning in Hierarchical Trees (3-D SPIHT)," IEEE Transactions on Circuits and Systems for Video Technology, vol. 10, no. 8, pp. 1374-1387, December 2000.