.help blkrep Sep86 images.imgeom
.ih
NAME
blkrep -- block replicate n-dimensional images
.ih
USAGE	
.nf
blkrep input output b1 [b2 b3 b4 b5 b6 b7]
.fi
.ih
PARAMETERS
.ls input
List of images to be block replicated.  Image sections are allowed.
.le
.ls output
List of output image names.  If the output image name is the same as the input
image name then the block replicated image replaces the input image.
.le
.ls b1, b2, b3, b4, b5, b6, b7
Block replication factor for dimensions 1 - 7.  Only the block factors for
the dimensions of the input image are required.  Dimension 1 is the column
or x axis, dimension 2 is the line or y axis.
.le
.ih
DESCRIPTION
The list of input images are block replicated by the specified factors
to form the output images.  The output image names are specified by the
output list.  The number of output image names must be the same as the
number of input images.  An output image name may be the same as the
corresponding input image in which case the block averaged image
replaces the input image.  Only the block factors for the dimensions
of the input images are used.

This task is a complement to \fBblkavg\fR which block averages or sums
images.  Another related task is \fBmagnify\fR which interpolates
images to arbitrary sizes.  This task, however, is only applicable to
two dimensional images with at least two pixels in each dimension.
Finally, in conjunction with \fBimstack\fR a lower dimensional image
can be replicated to higher dimensions.
.ih
TIMINGS
VAX 11/750 with FPA running UNIX 4.3BSD and IRAF V2.4:

.nf
       SIZE DATATYPE REPLICATION     CPU  CLOCK
        100    short           5    0.5s     1s
        100     real           5    0.5s     1s
    100x100    short         5x5    1.7s     5s
    100x100     real         5x5    2.1s     6s
  100x100x1     real       5x5x5    9.7s    33s
.fi
.ih
EXAMPLES
.ls 4 1.
To block replicate a 1D image in blocks of 3:

cl> blkrep imagein imageout 3
.le
.ls 4 2.
To block replicate a 2D image in blocks of 2 by 3:

cl> blkrep imagein imageout 2 3
.le
.ls 4 3.
To block replicate two 2D images in blocks of 5 by 5:

cl> blkrep image1,image2 out1,out2 5 5
.le
.ls 4 4.
To block replicate a 3D image in place by factors of 2:

cl> blkrep image1 image1 2 2 2
.le
.ls 4 5.
To smooth an image by block averaging and expanding by a factor of 2:

.nf
cl> blkavg imagein imageout 2 2
cl> blkrep imageout imageout 2 2
.fi
.le
.ls 4 6.
To take a 1D image and create a 2D image in which each line is the same:

.nf
cl> imstack image1d image2d
cl> blkrep image2d image2d 1 100
.fi
.le
.ls 4 7.
To take a 1D image and create a 2D image in which each column is the same:

.nf
cl> imstack image1d image2d
cl> imtranspose image2d image2d
cl> blkrep image2d image2d 100 1
.fi
.le

.ih
SEE ALSO
blkavg, imstack, magnify
.endhelp
