[vtkusers] how to visualise a RAW volume dataset using C++ in Visual Studio

Micha Feigin michf at post.tau.ac.il
Mon Sep 7 05:49:12 EDT 2009


On Mon, 7 Sep 2009 02:36:45 +0530
prasannjit ------------ <prasannjit at hotmail.com> wrote:

> 
> Hello,
> 
> I have to visualize a RAW volume data set, but I don't know how this can be done. I am working in C++ in Visual Studio 2008. I have earlier done the same for a vtk based volume. Is there a way to convert a RAW volume data set into VTK data set. Are there any VTK functions for reading such files?

Raw as in just a bunch of voxels?

If so, I'm not sure if it's the best way, but I just loaded the data into an
array, created a vtkFloatArray and attached the data to it and then used that
for whatever

	float *dataBuffer = ...

        vtkFloatArray *data = vtkFloatArray::New();
        data->SetArray(dataBuffer, width*height, 1);

> 
> 
> 
> 
> _________________________________________________________________
> Sports, news, fashion and entertainment. Pick it all up in a package called MSN India
> http://in.msn.com



More information about the vtkusers mailing list