[vtkusers] vtkImageImport array format

Koning, P.J.H. de (LKEB) P.J.H.de_Koning at lumc.nl
Tue Aug 27 03:57:47 EDT 2002


26-08-02 19:21:19, P K <xtalswing at yahoo.com> wrote:

Try the following for the data extent

SourceImport->SetDataExtent(0, source->size[0] - 1, 0, source->size[1] - 1, 0, source->size[2] - 1);


>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
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
>





More information about the vtkusers mailing list