#!/usr/bin/perl

# Requires the PDL module (http://www.perl.com/CPAN/modules/by-module/PDL)
# and the brain and brain.hdr files as described in earlier examples.
use PDL;
use PDL::IO::FastRaw;

$brain = readfraw("brain", {Dims => [351,412], ReadOnly => 1,});

# Excise the rectangular section defined by the two points (231, 204)
# and (346, 281)
#
$cerebellum = sec($brain, 231, 346, 204, 281);

writefraw($cerebellum, "cerebellum");
