]> Creatis software - bbtk.git/blob - packages/itk/bbs/appli/ImageCrop.bbs
ef71b4d1f0c31f075905bc5d961a23b0f5ba3f99
[bbtk.git] / packages / itk / bbs / appli / ImageCrop.bbs
1 description "Extracts a sub-image of an image"
2 author "laurent.guigues@creatis.insa-lyon.fr"
3 category "application"
4
5 load std
6 load itk
7
8 new ImageReader reader
9 input I reader.In "Input file name"
10
11 new ExtractImageFilter filter
12 connect reader.Out filter.In
13
14 new ImageRegion region
15 input P region.Index "Position of the crop region"
16 input S region.Size "Size of the crop region"
17
18 connect region.Out filter.Region
19
20 new ImageWriter writer
21 connect filter.Out writer.In
22
23 input O writer.In "Output file name"
24
25 exec writer