[Insight-users] reverse itkImagetoListAdaptor???

Luis Ibanez luis.ibanez at kitware.com
Sat Aug 15 19:11:20 EDT 2009


Hi Sergio,

There are no existing filters that will convert a Sample into an image,
However, you could write equivalent code without too much effort.

You will need something like the following:

ImageType::RegionType region =  inputImage.GetBufferedRegion();

ImageType::Pointer image = ImageType::New();
image.SetRegions();
image.CopyInformation( inputImage );
image.Allocate();

typedef ListSampleType::Iterator    SampleIterator;
SampleIterator sampleItr = sample->Begin();
typedef itk::ImageRegionIterator< ImageType > ImageIterator;
ImageIterator imageItr( image, region );
imageItr.GoToBegin();

while( sampleItr != sample->End() )
{
imageItr.Set(
    gaussianDensityFunction.Evaluate( sampleItr.GetMeasurementVector() ) );
++imageItr;
++sampleItr;
}



Regards,


      Luis

------------------------------------------------------------------
On Mon, Aug 10, 2009 at 9:25 PM, Sergio Aguirre <sergio.guirre at gmail.com>wrote:

> Hello everyone.
>
> I am working on analyzing some statistical information of DICOM images. I
> would like to see if it is possible to generate an image from a statistics
> measurement vector.
>
> Say for instance that I read a DICOM image, then using the
> itkImageToListAdaptor calculate its GDF using the
> itkGaussianDensityFunction, how could I translate the outgoing GDF vector
> back to an image?
>
> ITK Image -> ImageToListAdaptor -> itkGDF -> XXX??? -> ITK Image
>
> Thank you.
>
> Sergio
>
>
> _____________________________________
> 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 ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090815/59e4b911/attachment.htm>


More information about the Insight-users mailing list