diff --git a/examples/osgvolume/osgvolume.cpp b/examples/osgvolume/osgvolume.cpp index c3c732b54..4fc13e85e 100644 --- a/examples/osgvolume/osgvolume.cpp +++ b/examples/osgvolume/osgvolume.cpp @@ -1689,6 +1689,62 @@ int main( int argc, char **argv ) while(arguments.read("--shader")) { useShader = true; } osg::ref_ptr image_3d; + + std::string vh_filename; + while (arguments.read("--vh", vh_filename)) + { + std::string raw_filename, transfer_filename; + int xdim(0), ydim(0), zdim(0); + + std::ifstream header(vh_filename.c_str()); + if (header) + { + header >> raw_filename >> transfer_filename >> xdim >> ydim >> zdim >> xSize >> ySize >> zSize; + } + + if (xdim*ydim*zdim==0) + { + std::cout<<"Error in reading volume header "<> red >> green >> blue >> alpha; + if (fin) + { + std::cout<<"value = "<assign(valueMap, true); + } + } + + } + int sizeX, sizeY, sizeZ, numberBytesPerComponent, numberOfComponents; std::string endian, raw_filename;