Volume Medical Manipulation Toolkit 2.0
|
vmtkPreprocessing is a Class that estimate <histogram> <gradient> and <distance transform>=""> from discrete volume data. In this approach, the gradient vector is pre-computed while the data is being loaded, before the rendition. More...
#include <vmtkPreprocessing.h>
Public Member Functions | |
Preprocessing (DCMDataType *rawData) | |
~Preprocessing () | |
void | Compute1DHistogram (DCMDataType *data) |
int | DistanceToEdge (int x, int xMax, int y, int yMax, int z, int zMax) |
Static Public Member Functions | |
static UINT32 | NameEncode (int x, int y, int z) |
static void | NameDecode (UINT32 id, int *x, int *y, int *z) |
vmtkPreprocessing is a Class that estimate <histogram> <gradient> and <distance transform>=""> from discrete volume data. In this approach, the gradient vector is pre-computed while the data is being loaded, before the rendition.
The gradient vector uses additional <volume texture>=""> that is sampled at runtime.
We use the gradient magnitude for generate a 2D Transfer Function and the gradient vector should be used for volume illumination in GPU-based volume rendering.
The parameter of constructor is pointer to raw data. If exist the pre-computed gradient file, the file is loaded, otherwise, the gradient is computed based on <Central differences="" method>="">.
Preprocessing::Preprocessing | ( | DCMDataType * | rawData | ) |
Constructor
Find maximum scalar value into volume data
Compute 1D Histogram
Preprocessing::~Preprocessing | ( | ) |
Destructor
void Preprocessing::Compute1DHistogram | ( | DCMDataType * | data | ) |
Compute Histogram 1D of Volume Data
Compute 1D Histogram
Find the Max and Min, except data in [zero]
Normalize 1D Histogram to [0,1]
Save 1D Histogram