hi,
I'm implementing a new volumetric data node as an add in to VHTK, based loosely on ComposedScalarVolumes. The nodes will take in a some scalar volumes stored in
Inst< MFScalarImageNode > _scalarVolume
After parametrisation, the data in those images will be stored in a data array of type RGB, which will be used to update "value" using a PixelImage constructor (as in ComposedScalarVolumes).
However, I have the following issues with this approach:
1. how should a node of type MFScalarImageNode be declared in x3d, from ScalarVolume? I saw examples using MultiTexture and examples using ScalarVolume that load 1 volume from a url. But I failed to see how to combine the two. Would some one please include a examplary .x3d code which does that?
2. the constructor of an image of class PixelImage is as following:
PixelImage (unsigned int _width,
unsigned int _height,
unsigned int _depth,
unsigned int _bits_per_pixel,
PixelType _pixel_type,
PixelComponentType _pixel_component_type,
unsigned char *data,
bool copy_data=false,
const Vec3f &_pixel_size=Vec3f(0, 0, 0))
However, my data will be of type RGB or Vec3f. How should I create an Image *value from my "data" ? My code at the moment would not compile due to this one issue.
Would you please help me through these issues?