[Insight-users] using filters on sample data
Luis Ibanez
luis.ibanez at kitware.com
Sun Apr 30 16:50:33 EDT 2006
Hi Aditya,
You may have to create an ITK image of the appropriate size,
and the use Image Iterators for filling it the content.
You will iterate simultaneously through the samples in your
list Sample and through the pixels in the image.
You will find details about how to build an ITK image from
scratch in the "Data Representation" chapter of the ITK
Software Guide
http://www.itk.org/ItkSoftwareGuide.pdf
You may also need to read the "Image Iterators" chapter
towards the end of the guide.
Make sure that you set the image region size appropriately
and that you call the Allocate() method before you attempt
to fill in the image by visiting it with iterators.
Regards,
Luis
============================
Aditya Chandramouli wrote:
> Hi Luis,
>
> Basically, I'm trying to implement an Expectation-Maximization routine for an
> image segmentation.
>
> => I start by iterating over my image and calculate a Gaussian mixture(with
> the help of GaussianDensityFunction in the Statistics package).
>
> => I store the results in a ListSample with measurement vector type
> itk::Vector<float, NumberOfChannels>
>
> => The next step of my implementation requires me to process these results and
> apply a simple Low Pass filter. This is where the problem lies.
>
> => After this, the filtered data has to be further processed and stored back
> to an image.
>
> Hope this is clear.
>
> Thanks a lot for your patience in looking into this.
>
> -aditya
>
> PS: To try to get around this problem, I've so far tried to create an empty
> image and iterate over it, filling the pixels with the data that I would
> filter subsequently. However this means I have to use the inefficient Set()
> method to set the pixel values. Apart from that, I'm getting a segmentation
> fault (presumably because the image is empty to begin with)...
>
>
> On Sunday 30 April 2006 01:38, you wrote:
>
>>What kind of data is exactly stored in your ListSample ?
>>
>>do you have pixel values ?
>>
>>or coordinates ?
>>
>>How did you got your ListSample ?
>>
>>
>> Please let us know,
>>
>>
>>
>> Thanks
>>
>>
>> Luis
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
More information about the Insight-users
mailing list