[vtkusers] vtkImageImport array format

P K xtalswing at yahoo.com
Mon Aug 26 13:21:19 EDT 2002


What is the format for data being passed to
vtkImageImport?

I'm trying to import a set of (x,y,z,i) values using
vtkImageImport.  I'm currently storing the intensity
values in  double * indexed as
[x*ysize*zsize+y*zsize+z].

vtkImageImport *SourceImport = vtkImageImport::New();
SourceImport->SetDataScalarTypeToDouble();  
SourceImport->SetDataExtent(source->origin[0],source->size[0],source->origin[1],source->size[1],source->origin[2],source->size[2]);

SourceImport->SetImportVoidPointer(srcptr);

This approach seems to result in an exception being
thrown down the line.  Previous postings on the
vtkusers list refer to an example on the use of
vtkImageImport, but such doesn't appear to be included
in the current release.  What would be the correct way
to import this data set?
Thanks,
--Peter


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com



More information about the vtkusers mailing list