[Insight-developers] ITK wrapping status

Michal Suchanek hramrach at centrum.cz
Fri Oct 22 11:30:46 EDT 2010


2010/10/22 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>
> Le 22 oct. 10 à 15:16, Michal Suchanek a écrit :
>
>> 2010/10/22 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>>>
>>> Le 22 oct. 10 à 09:08, Michal Suchanek a écrit :
>>>
>>>> Hello
>>>>
>>>> 2010/10/21 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>>>>
>>>>>
>>>>>
>>>>> I've just commited a fix in ITK.
>>>>> I don't know why I haven't seen that bug yesterday...
>>>>>
>>>>
>>>> Thanks for fixing that.
>>>>
>>>> I have now installable wrappings.
>>>
>>> great!
>>>
>>>>
>>>> I tried porting the WaterSchedSegmentation1 example to the new
>>>> wrappings but is seems they are lacking itkImageFileWriterIUL2 which
>>>> makes this example unportable to them.
>>>
>>> Well, not exactly unportable. You just have to convert the output of the
>>> watershed to a more usable type (not tested):
>>
>> I did that earlier to allow writing the output to an usable image
>> format such as PNG.
>>
>> Given that viewers for image types that can store UL component are
>> rare it is the easiest way to use the example.
>>
>> As I don't have InsightAppliactions built against any library that
>> does not conflict with ITK 4 and can't recall any other usable viewer
>> for nrrd or VTK images it is not exactly easy to view the result but
>> the example at least does not fail when the UL2 writer is wrapped.
>>
>> 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.

Thanks

Michal


More information about the Insight-developers mailing list