[Insight-developers] ITK wrapping status

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Fri Oct 22 13:42:46 EDT 2010


Le 22 oct. 10 à 19:35, Michal Suchanek a écrit :

> 2010/10/22 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>>
>> Le 22 oct. 10 à 17:30, Michal Suchanek a écrit :
>>
>>> 2010/10/22 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>>>>
>>>>>
>>>>>
>>>>> Also the filter intentionally uses UL output to get the best  
>>>>> possible
>>>>> resolution and the image may lose detail when converted to UC.
>>>>
>>>> you shouldn't loose anything when converting to UC with the relabel
>>>> filter
>>>> if there are less than 256 zones identified.
>>>> If UC is not enough, there is also US (16bit) available by default.
>>>>
>>>>>
>>>>> The obvious choice of filter for this job it RescaleIntensity  
>>>>> but that
>>>>> is not wrapped with inputs and outputs suitable for this  
>>>>> example, nor
>>>>> is RelabelComponent.
>>>>
>>>> RescaleIntensity is NOT well suited for this task, beacause it  
>>>> can merge
>>>> several labels in a single one. RelabelComponent is the filter  
>>>> you want.
>>>> RelabelComponent should be wrapped with the necessary types to  
>>>> convert UL
>>>> pixel type to UC or US.
>>>
>>> UC  is not wrapped by default so there are no UC filters at all.
>>>
>>> US will likely not work with most image writers either but at least
>>> the modified JPEG should support it.
>>
>> UC is always wrapped for the writer, even when not selected in cmake
>> options.
>
> Yes, it is supported by the writer but not by any filters so you
> cannot convert it to the writer format.
>

of course you can do the conversion - it would be a complete waste of  
space and build time to have it for the writer without that!
CastImageFilter is there for that.

>> US is well supported by tif and png.
>
> It is. I get a ~ black output image.
>
> While the RelabelComponent filter may be better for preserving
> information (zones) in the image regardless of intensity (which is
> artifical on segmentation output anyway) the RescaleIntensity filter
> is better suited for a demo because it provides the user with
> segmentation results visible in a plain image viewer (which does not
> do the equivalent of RescaleIntensity as default preprocessing).


You may want to produce a colored output instead of an almost black  
image then.
LabelToRGBImageFilter is able to convert your label image in a more  
human friendly, colored image.

Gaëtan

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20101022/8c069ecd/attachment.pgp>


More information about the Insight-developers mailing list