]> Creatis software - bbtk.git/blob - packages/itk/bbs/appli/ImageInfo.bbs
6e24f9dbb77881e481ceb350a5ef844a21fe8583
[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.Filename
17
18 # Allow user to specify his own image, in GUI mode (-g option)
19 #---------------------------------------------------------------
20 set reader.Filename "thorax.hdr"
21 input In reader.Filename "Input file"
22
23 new ImageProperties P
24 connect reader.Out P.In
25
26 print "Type      = $P.TypeName$\n"
27 print "Dimension = $P.Dimension$\n"
28 print "Size      = $P.Size$\n"
29 print "Spacing   = $P.Spacing$\n"
30
31 #graph