NAME
get_target_image - Gets target float image for "building block" routines
SYNOPSIS
#include "i/i_float.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int get_target_image
(
KJB_image **target_ipp,
int num_rows,
int num_cols
);
DESCRIPTION
This routine implements the image creation/over-writing semantics used in
the KJB library in the case of Byte images. If *target_ipp is NULL, then
this routine creates the images. If it is not null, and it is the right
size, then this routine does nothing. If it is the wrong size, then it is
resized.
In order to be memory efficient, we free before resizing. If the resizing
fails, then the original contents of the *target_ipp will be lost.
However, *target_ipp will be set to NULL, so it can be safely sent to
free_float_image(). Note that this is in fact the convention throughout the
KJB library--if destruction on failure is a problem (usually when
*target_ipp is global)--then work on a copy!
The sizes (num_rows and num_cols) must both be nonnegative.
Conventionally, num_rows and num_cols are both positive;
however, it is also acceptable to have num_rows and num_cols both zero.
Anything else (such as a mix of positive and zero sizes) is regarded as a
bug in the calling program -- set_bug(3) is called and (if it returns)
ERROR is returned.
RETURNS
NO_ERROR on sucess and ERROR on failure.
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Kobus Barnard
SEE ALSO
kjb_create_image
,
kjb_free_image
,
kjb_copy_image
,
get_image_window
,
get_zero_image
,
get_invalid_zero_image
,
get_initialized_image
,
get_initialized_image_2