[vtkusers] vtkImageImport

Erik Türke tuerke at cbs.mpg.de
Mon Mar 29 15:33:12 EDT 2010


On 03/29/2010 08:40 PM, David Gobbi wrote:
> On Mon, Mar 29, 2010 at 12:26 PM, Erik Türke<tuerke at cbs.mpg.de>  wrote:
>
>    
>> Hi!
>>
>> Well, this should be part of an adapter...so the user should get a list of
>> pointers to vtkImageData objects (i return a list since the adapter also
>> gets 4d data as input).
>> But it seems, this is not possible, so i have to return a list of pointers
>> to vtkImageImport objects, what imho is a little odd for the user of the
>> adapter.
>>      
> I don't understand what you are trying to say.  Can you give more detail?
>
>    David
>    
Hi

I want to write an adapter which takes an image object of an own type 
and returns a list of vtkImageData type pointers, like:

data::ImageList imgList = isis::data::IOFactory::load("data.nii", "");

or

isis::data::ImageList imgList = isis::data::IOFactory::load("data.v", "");

imgList is the image object of type own, which i want to transform into 
a vtkImageData object, like

std::list<vtkImageData*> vtkList = 
isis::adapter::VTKAdapter::makeVtkImageList(imgList.front());

(do not be confused of the imgList.front()...this is an object of 
dimension 4, so i want to return a list of 3d vtkdata)

So, if someone for instance write an vtk image viewer which should 
support the isis image type, he/she can use the VTKAdapter to transform 
my own imagetype into a vtkImageData type and use it.

But the way things are going i have to return vtkImageImport objects:

std::list<vtkImageImport*> vtkList = 
isis::adapter::VTKAdapter::makeVtkImageList(imgList.front());

which actually was not my goal.

cheers








More information about the vtkusers mailing list