]> Creatis software - bbtk.git/blob - packages/itk/bbs/appli/ImageInfo.bbs
da1f3e821a65ef30575c804fe3da75ba6cc3ea1a
[bbtk.git] / packages / itk / bbs / appli / ImageInfo.bbs
1 #load std
2 load itk
3
4 description "Gives information on the input image (pixel type, dimension, size, spacing)"
5 author "laurent.guigues@creatis.insa-lyon.fr"
6 category "application;image"
7
8 new ImageReader reader
9
10 # Make File name Using Black Box 'PrependDataPath'
11 #----------------------------------------------------
12 #note : .bbs not mandatory
13 include std/boxes/bbPrependDataPath
14 new PrependDataPath pdp
15 set pdp.In "thorax.hdr"
16 #connect pdp.Out reader.In
17
18 # Allow user to specify his own image, in GUI mode (-g option)
19 #---------------------------------------------------------------
20 set reader.In "hola.mhd"
21 input I reader.In "Input image file"
22
23 new ImageProperties P
24 connect reader.Out P.In
25
26 print "Type      = $P.TypeName$"
27 print "Dimension = $P.Dimension$"
28 print "Size      = $P.Size$"
29 print "Spacing   = $P.Spacing$"
30
31 #graph