Fw: [Insight-users] Converting Image Data to Vector type

Luis Ibanez luis . ibanez at kitware . com
Mon, 05 Aug 2002 09:42:08 -0400


Hi Samuel,

You also do the following:

1) read your PNG image in a image of scalar pixels.

2) instantiate an image of vector pixels (1D vectors are Ok)
    and allocate memory for the image size of the input.

3) add a while() loop to copy pixels from the scalar image
    to the vector image.

4) plug the vector image as input of the gibbs filter.


The disadvantage of this option is that the pipeline will be
starting at the vector image, that is, you will have to
manually update the file reading filter and then trigger the
while() loop to copy data into the vector image.

Once the data is on the vector image, the rest of the
pipeline will manage updates all by itself.


Please let us know if you want some hint on how to
copy the pixel data.

   Thanks,

    Luis


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

Samuel Rodríguez Bescos wrote:
> Thanks Luis for your help.
> 
>  Your second reply solves my problem. But My first question in not the same
> that you think. I have a grey scale images and I want to use the gibbs
> segmentation filter. This filter need  a mask of the estimation of my object
> and I want to use the gaussian classifier. I noticed that this filter need
> the input in vector format. furthermore I want to read my image in .PNG
> format and I think that It not  posible to read a gray-scale image in .PNG
> format with pixels like  vectors of one dimension. Maybe I can't explain you
> enough clearly, I'm sorry for that but my English is not so good.
> 
> Thank for your help. It very useful for me,
> 
> Samuel
>