--- /dev/null
+print "=== LoadHola box example ==="
+description "LoadHola box example"
+author "laurent.guigues at creatis.insa-lyon.fr"
+category "example"
+
+include util
+new LoadHola loader
+print "Path to the 'hola' image = '$loader.FileName$'"
+print "Image loaded = $loader.Out$"
--- /dev/null
+load std
+
+define PrependPackageDataPath util
+ author "laurent.guigues at creatis.insa-lyon.fr"
+ description "Prepends the input file name 'In' with the path to the data directory of the package 'Package'"
+ category "misc"
+
+ # For getting bbtk Data Path
+ new Configuration c
+
+ # For making a full path name, avoiding troubles with / or \
+ new MakeFileName mfn1
+ new MakeFileName mfn2
+
+ connect c.DataPath mfn1.Directory
+ connect mfn1.Out mfn2.Directory
+
+ # inputs / outputs
+ input In mfn2.File "Last Filename"
+ input Package mfn1.File "Package name"
+ output Out mfn2.Out "Full path Filename"
+endefine
+
--- /dev/null
+load vtk
+include std/boxes/bbPrependPackageDataPath
+
+define LoadHola
+ description "Loads the image 'hola.mhd'"
+ author "laurent.guigues at creatis.insa-lyon.fr"
+ category "image;read/write"
+
+ new MetaImageReader reader
+ new PrependPackageDataPath ppdp
+ set ppdp.In "hola.mhd"
+ set ppdp.Package "vtk"
+ connect ppdp.Out reader.In
+
+ output Out reader.Out "The image"
+ output FileName ppdp.Out "The path to the image loaded"
+
+endefine
--- /dev/null
+ObjectType = Image
+NDims = 3
+BinaryData = True
+BinaryDataByteOrderMSB = False
+ElementSpacing = 0.796875 0.796875 0.7
+DimSize = 112 131 192
+Position = 0 0 0
+ElementNumberOfChannels = 1
+ElementType = MET_USHORT
+ElementDataFile = hola.raw