[Insight-users] Converting Image Data to Vector type

Luis Ibanez luis . ibanez at kitware . com
Fri, 02 Aug 2002 09:53:39 -0400


Hi Samuel,

Could you please clarify a bit your questions:

1) For reading: do you want to read a .png image file into
    a vector image (image with pixels of type vector) ?

    or do you want to put a color image into a image whose
    pixel type is vector ?

    or you want to read several .png files and put each one
    in a particular component of the pixel ?

    If this is the question, you may use ImageAdaptors.
    An adaptor allows to present an image of one type as if
    it were an image of another type. In this case you could
    instantiate an image of type Image< Vector<float,2>, 3 >
    (a 3D image whose pixels are vectors of 2D) and present
    this image as if it were a Image< float, 3 > (a 3D image
    of floats).

2)  Your second question is a bit generic. How to label an image
     with 1's in the object and 0's in the background is subject
     to the image content. (otherwise ITK will not have any fun !).

     What kind of image do you want to segment and what is the
     content on them ?


Thanks


Luis


============================================================

Samuel Rodríguez Bescos wrote:
> Hello everybody,
> 
>  
> 
> I'm making a example base in itkGibbs segmentation method  with a 
> Gaussian classifier for grey-scale images.
> 
> The problem is that I want to read the original image in .png format and 
> I think that It isn't posible template the imageFileReader with a vector 
> class. is it?.
> 
>  
> 
> I'm thinking in use other segmentation method, but can anybody tell me 
> if there is a class to create a label image with 1's in the pixel of the 
> object and 0 in the other pixels?
> 
>  
> 
> How can I do to solve these problems?.
> 
>  
> 
> Thanks a lot  in Advance.
> 
>  
> 
> Samuel
>