[vtkusers] Image Properties: Scalar Components

Christian Werner christian.werner at rwth-aachen.de
Wed Feb 17 14:11:57 EST 2010


I am so sorry. One and a half day of headache just because I did not 
know how to set up RGB Image Types in ITK. Everything works fine now and 
I have my superb vtktSimpleImageToImageITKFilter up and running :)

In case somebody wants to know:

    typedef itk::RGBPixel< char >        PixelType;
    typedef itk::Image<PixelType, DIM>    InputType;

that does the trick and any itkVTKImageImporter instantiated that way is 
happy with RGB images from VTK!


Best regards,
Christian



Christian Werner wrote:
> Hello!
>
> I am sorry, but I still did not get to solve my problem stated in my 
> last post. The thing is that I have to make my vtkImageData have only 
> 1 scalar component, so that I can pass it to a itkVTKImageImporter. I 
> can't seem to find good documentation on these scalar components and 
> how to convert them. I cannot just "SetNumberOfScalarComponents(1)" 
> since my data gets corrupted that way. For details you might consult 
> my last posting. I also cannot influence the way my vtkImageData is 
> created, because I am writing a new filter which means that the image 
> I want to export is given as input.
>
> Best regards,
> Christian
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: 
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list