[Insight-users] [resolved] Showing an image using itk.show2D
Gaëtan Lehmann
gaetan.lehmann at jouy.inra.fr
Fri Feb 10 09:12:18 EST 2012
Le 10 févr. 12 à 14:52, Mathieu Stumpf a écrit :
> Hello,
>
> Following the FARSIGHT tutorial[1] and I tried to display an image
> as said, I got the following error:
> itk.show2D( image1 )
> sh: imagej: not found
> <itkExtras.show2D instance at 0x2abdc20>
>
> As the wiki said it uses imview, I installed it (debian package),
> and I
> downloaded[2] in /usr/local/lib/ITK-4.1/Python/ (which is in my
> PYTHONPATH).
>
> So `import imview` worked, but I still had the same error message.
>
> Well as you may have guessed, the problem was that the `imagej`
> program
> wasn't installed, so imview was (probably) not required after all.
>
> I hope you appreciate this kind of feedback. My apologies if this kind
> of message is considered as noise on this ml.
>
> Kind regards,
> Mathieu
>
> [1] http://farsight-toolkit.org/wiki/FARSIGHT_Tutorials/Quick_Start#Showing_an_image
> [2] http://mima2.jouy.inra.fr/git/contrib-itk/Imview/Wrapping/Python/itkExtras/imview.py
Hi Mathieu,
None of imview or imagej is required, but imagej is now used by default.
You can use your preferred viewer as long as it can open an image from
the command line. There are a few environment variable to tell
itk.show2D() how to use it.
For example, I have
export WRAPITK_SHOW2D_COMMAND="$HOME/Fiji.app/fiji-linux64 %
(image)s -run 'View 100%%' -eval 'rename(\"%(title)s\")' -eval
'setSlice(maxOf(1, nSlices/2))' &"
export WRAPITK_SHOW2D_LABEL_COMMAND="$HOME/Fiji.app/fiji-linux64 %
(image)s -run 'View 100%%' -eval 'rename(\"%(title)s\")' -run '3-3-2
RGB' -eval 'setSlice(maxOf(1, nSlices/2))' &"
export WRAPITK_SHOW2D_EXTENSION=".nrrd"
export WRAPITK_SHOW2D_COMPRESS="off"
in my .bashrc on my workstation.
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://mima2.jouy.inra.fr http://www.itk.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/pipermail/insight-users/attachments/20120210/6e209936/attachment.pgp>
More information about the Insight-users
mailing list