[Insight-users] ExtractFilter on VectorImage

Luis Ibanez luis.ibanez at kitware.com
Fri Jan 27 11:42:13 EST 2006


Hi Jordi,

We just committed a fix to the CVS repository regarding this issue.

Changes were made in:

1) ExtractImageFilter
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/BasicFilters/itkExtractImageFilter.txx?root=Insight&sortby=date&r2=1.20&r1=1.19

and


2) RegionOfInterestImageFilter
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/BasicFilters/itkRegionOfInterestImageFilter.txx?root=Insight&sortby=date&r2=1.12&r1=1.11
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/BasicFilters/itkRegionOfInterestImageFilter.txx?root=Insight&sortby=date&r2=1.11&r1=1.10


If you have a chance, could you please update your CVS checkout
of ITK and give it a try to the Extract filter ?


Please let us know if you find any problems,


    Thanks


       Luis



--------------------
Luis Ibanez wrote:
> 
> Hi Jordi
> 
> Thanks for pointing this out.
> 
> The support for VectorImages in all ITK filters is being introduced
> progressively. In principle, most ITK filters should work for Vector
> images, but there are many filters that have never been tried, so
> it is quite possible that you will run into some filters that do not
> manage the VectorImages correctly.
> 
> In those cases, we appreciate to receive the reports, so we can fix
> those filters.
> 
> What is probably happening in the ExtractImage filter is that it is
> not copying the Length from the input image into the output image.
> This copy should happen during the invocation of the CopyInformation()
> method, in the ImageBase class.
> 
> We will take a look at this filter (and the closely related
> itkRegionOfInterestImageFilter) and make sure that they can be
> used for processing VectorImages,... and will let you know when
> this modifications are available in the CVS repository.
> 
> 
> 
> 
>     Regards,
> 
> 
> 
>        Luis
> 
> 
> 
> 
> -----------------------
> Jordi Inglada wrote:
> 
>> Hi,
>>
>> As suggested by Karthik as an answer to my post on multi-dimensional 
>> images, we are now using the itkVectorImage class.
>>
>> We are now facing a problem when plugging VectorImages into the 
>> itkExtractImageFilter. We use
>>
>>  typedef itk::VectorImage < PixelType, Dimension>        ImageType;
>>
>> and the pipeline is as follows :
>>
>> Reader --> ExtractFilter --> Writer
>>
>> Our first test used an RGB PNG image. Interestingly, the IO PNG 
>> ressource knows how to build a 3 channel VectorImage. Actually, if we 
>> use the very simple pipeline
>>
>> Reader --> Writer
>>
>> with the ImageType defined above, the output image is the exact copy 
>> of the input one.
>>
>> However, when the extract filter is used, the output PNG image, even 
>> if it has the right dimensions, it is empty except for some columns. 
>> In the case where I try to write it in JPEG, I get the following 
>> message : "Too many color components: 0, max 10".
>>
>> I have found a workaround by creating a VectorToRGBImageFilter which 
>> does the conversion (I wasn't able to make Adaptors work for 
>> VariableLengthVector pixels). And it works if the conversion is done 
>> BEFORE the extract filter. The output images are bad if the conversion 
>> is done AFTER the extract filter.
>>
>> By now, this solution is OK for me, but I think that this is not 
>> really satisfacttory.
>>
>> So my question is : can one use the VectorImage as any other 
>> itk::Image with itk filter, or has one to make the conversion to fixed 
>> array pixel types in order to make things work?
>>
>> Thanks.
>>
>> Jordi
>>
>>
> 
> _______________________________________________
> 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