[Insight-developers] ITK wrapping status

Michal Suchanek hramrach at centrum.cz
Fri Oct 22 13:52:41 EDT 2010


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.
> US is well supported by tif and png.
>

I rebuilt the wrappings with UC support.

The very basic functions work for me now.

I can run my toy program for highlighting image differences in the
"spot N differences" style games.

Sample usage:

CLASSPATH=/usr/share/java/org.itk.io.jar:/usr/share/java/org.itk.compose.jar:/usr/share/java/org.itk.calculators.jar
VERIFY_JRUBY=1 jruby cimgdiff.rb YM ../flower1l.png ../flower1r.png
flower_1ym.png

Setting VERIFY_JRUBY is a hack to run JRuby programs that load
libraries without modification to standard JRuby installation.

Thanks

Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cimgdiff.rb
Type: application/x-ruby
Size: 1779 bytes
Desc: not available
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20101022/b36e48c7/attachment.rb>


More information about the Insight-developers mailing list