[Paraview] Question on Image reader

Michael Jackson mike.jackson at bluequartz.net
Tue Jan 6 11:40:27 EST 2009


vtkImage->GetScalarPointer(); will return a void* which you can cast  
to the appropriate type for your image data.

You can then use any byte copying routine to copy the data from the  
file into the byte array. To save yourself some of that copying if  
your data file is setup so that you can read some header information  
so that you know how much to allocate you can FIRST allocate the  
vtkImageData object, get the pointer to the front of the array and  
read directly from the file into the array.

_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio



On Jan 6, 2009, at 11:17 AM, Thorsten Hater wrote:

> Hello everyone.
>
> I'm trying to implement a custom reader for ParaView 3.4.
> The output data is of the ImageData type.
> With the help of the ParaView guid I got as far as implementing
> the reader, save the most important bit of filling the actual data
> into the output object.
> So I have got the raw binary array - or file, if this is better -
> and the vtkImageData object.
> How can I move my data into the vtk object?
>
> Thanks in advance
>   Thorsten
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview



More information about the ParaView mailing list