Hi Michael,
thanks for bringing this up. This is definitely a missing feature (I am
not sure if this is a regression due to the commented code or not). I
filed bug http://bugs.mitk.org/show_bug.cgi?id=18512 and you could add
yourself to the cc list to monitor its progress.
Best,
Sascha
On 11/21/2014 02:49 PM, Michael Hofmann wrote:
> Hello group,
>
> I'm trying to import an image from VTK into a mitk::Image. My code looks
> basically like this:
>
> mitk::Image::Pointer Import(vtkImageData *vtkimg)
> {
> mitk::Image::Pointer mitkimg = mitk::Image::New();
> mitkimg->Initialize(vtkimg);
> mitkimg->SetVolume(vtkimg->GetScalarPointer());
>
> return mitkimg;
> }
>
> However, the newly created image always has one scalar component, no
> matter how many components the original vtkImageData contains. The
> reason for this behavior is that mitk::Image::Initialize doesn't take
> the number of components into account when it creates the image's PixelType:
> http://mitk.org/git/?p=MITK.git;a=blob;f=Core/Code/DataManagement/mitkImage.cpp;h=05612c374f9422899a68e1cbc9b158d9a96fb63c;hb=HEAD#l954
>
> I'm somewhat confused by the fact, that the older, seemingly correct,
> initialization code was commented out. Is this really expected behavior?
> If yes, what is the correct way to import a multi-component image from VTK?
>
> Kind regards,
> Michael
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> _______________________________________________
> mitk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users