vdataloader.c File Reference

Handle the loading of data-files. More...

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "rendermodes.h"

Defines

#define MAXXSIZ
#define MAXYSIZ
#define MAXZSIZ
#define MAXVOXELS

Functions

void my_vox_hack (void)
 Postprocess .vox-files.
 loadVOX (char *filename)
 Load .vox-files.
void extract_data (unsigned char *raw)
 Decompress .kvx-files.
unsigned char * my_loadkvx (const char *filename)
 Load .kvx-files.
void loadKVX (char *arg)
 Load .kvx-files Wrapper-function.
void loadDAT (char *filename)
 Load .dat-files.
void calculate_gradients (void)
 Calculate the gradients by "central-differences".
void smooth_data (uint32_t *in, uint32_t mask, uint32_t shift)
 Smooth data.
void create_mipmap (void)
 Create "3D-mipmap".
void apply_cut_plane (float *plane_equ)
 Cut object with plane.
void apply_cut_sphere (float *sphere_equ, int inside_outside_flag)
 Cut object with sphere.

Variables

unsigned char * voxdat
long * xoffset
short * xyoffset
uint32_t * voxel
int vol_loaded
int alloced_voxdat
float cc [3]
long xpivot
long ypivot
long zpivot
uint32_t xsiz
uint32_t ysiz
uint32_t zsiz
unsigned char * rawslabdata


Detailed Description

Handle the loading of data-files.


Function Documentation

void apply_cut_plane float *  plane_equ  ) 
 

Cut object with plane.

Parameters:
plane_equ Pointer to the parameters of the cut-plane's equation.

void apply_cut_sphere float *  sphere_equ,
int  inside_outside_flag
 

Cut object with sphere.

Parameters:
sphere_equ Pointer to the parameters of the cut-plane's equation.
inside_outside_flag Flag which indicates, if in- or outside of sphere is to be cut away from the voxel-object.

void calculate_gradients void   ) 
 

Calculate the gradients by "central-differences".

Approximate normalvector for each voxel/cell by local gradient.

void create_mipmap void   ) 
 

Create "3D-mipmap".

Create low-level mipmap for empty space skipping.

void extract_data unsigned char *  raw  ) 
 

Decompress .kvx-files.

Parameters:
raw Compressed data.

void loadDAT char *  filename  ) 
 

Load .dat-files.

Load the "native"-VisLU data-files.

Parameters:
filename File to load.

void loadKVX char *  arg  ) 
 

Load .kvx-files Wrapper-function.

KVX-fileformat invented by Ken Silverman http://www.advsys.net/ken Calls extract_data() on the actual load-procedure my_loadkvx()

Parameters:
arg File to load.

loadVOX char *  filename  ) 
 

Load .vox-files.

VOX-fileformat invented by Ken Silverman http://www.advsys.net/ken

Parameters:
filename File to load.

unsigned char* my_loadkvx const char *  filename  ) 
 

Load .kvx-files.

KVX-fileformat invented by Ken Silverman http://www.advsys.net/ken

Parameters:
filename File to load.

void smooth_data uint32_t *  in,
uint32_t  mask,
uint32_t  shift
 

Smooth data.

Parameters:
in Pointer to voxel-data.
mask Mask to control which part of the data is to be affected by smoothing.
shift Bit-shift to control which part of the data is to be affected by smoothing.


Generated on Wed Dec 13 08:40:13 2006 for PHDVR - Direct Volume Renderer by  doxygen 1.4.6