Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

PDL::Transform 2.4.3

Date Added: November 05, 2010  |  Visits: 867

PDL::Transform is a Perl module that coordinate transforms, image warping, and N-D functions. SYNOPSIS use PDL::Transform; my \$t = new PDL::Transform:: ( ) \$out = \$t->apply(\$in) # Apply transform to some N-vectors (Transform method) \$out = \$in->apply(\$t) # Apply transform to some N-vectors (PDL method) \$im1 = \$t->map(\$im); # Transform image coordinates (Transform method) \$im1 = \$im->map(\$t); # Transform image coordinates (PDL method) \$t2 = \$t->compose(\$t1); # compose two transforms \$t2 = \$t x \$t1; # compose two transforms (by analogy to matrix mult.) \$t3 = \$t2->inverse(); # invert a transform \$t3 = !\$t2; # invert a transform (by analogy to logical "not") PDL::Transform is a convenient way to represent coordinate transformations and resample images. It embodies functions mapping R^N -> R^M, both with and without inverses. Provision exists for parametrizing functions, and for composing them. You can use this part of the Transform object to keep track of arbitrary functions mapping R^N -> R^M with or without inverses. The simplest way to use a Transform object is to transform vector data between coordinate systems. The apply method accepts a PDL whose 0th dimension is coordinate index (all other dimensions are threaded over) and transforms the vectors into the new coordinate system. Transform also includes image resampling, via the map method. You define a coordinate transform using a Transform object, then use it to remap an image PDL. The output is a remapped, resampled image. You can define and compose several transformations, then apply them all at once to an image. The image is interpolated only once, when all the composed transformations are applied. In keeping with standard practice, but somewhat counterintuitively, the map engine uses the inverse transform to map coordinates FROM the destination dataspace (or image plane) TO the source dataspace; hence PDL::Transform keeps track of both the forward and inverse transform. For terseness and convenience, most of the constructors are exported into the current package with the name t_ , so the following (for example) are synonyms: \$t = new PDL::Transform::Radial(); # Long way \$t = t_radial(); # Short way Several math operators are overloaded, so that you can compose and invert functions with expression syntax instead of method syntax (see below)..

 Requirements: No special requirements Platforms: Linux Keyword: Coordinate,  Image,  Image Warping,  Libraries,  Method,  Pdl,  Pdltransform,  Perl Module,  Programming,  Transform,  Transforms Users rating: 0/10