Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Static Public Member Functions | Static Private Member Functions
icl::io::TestImages Class Reference

Utility class for creating test images. More...

#include <TestImages.h>

List of all members.

Static Public Member Functions

static core::ImgBasecreate (const std::string &name, const utils::Size &size, core::format f=core::formatRGB, core::depth d=core::depth8u)
 creates a new testimage instance
static core::ImgBasecreate (const std::string &name, core::format f=core::formatRGB, core::depth d=core::depth8u)
 creats testimages in original size
static void xv (const core::ImgBase *image, const std::string &tmpName="./tmp_image.ppm", long msec_to_rm_call=1000)
 writes the image to the disc an shows it using xv.
static void show (const core::ImgBase *image, const std::string &showCommand="icl-xv -input %s -delete", long msec_to_rm_call=0, const std::string &rmCommand="")
 writes the image to the hard disk and show it using the given shell command

Static Private Member Functions

static core::Img8uinternalCreate (const std::string &name)
 internal creation funtion for image

Detailed Description

Utility class for creating test images.


Member Function Documentation

static core::ImgBase* icl::io::TestImages::create ( const std::string &  name,
const utils::Size size,
core::format  f = core::formatRGB,
core::depth  d = core::depth8u 
) [static]

creates a new testimage instance

possible values for name are

  • lena
  • cameraman
  • mandril
  • women
  • house
  • tree
  • parrot
  • windows
  • flowers
    Parameters:
    namename identifier of the image
    sizedestination size of the image
    fcore::format of the image
    dcore::depth of the image
    Returns:
    new image (ownership is passed to the caller!)
static core::ImgBase* icl::io::TestImages::create ( const std::string &  name,
core::format  f = core::formatRGB,
core::depth  d = core::depth8u 
) [static]

creats testimages in original size

Parameters:
namename identifier of the image
fcore::format of the image
dcore::depth of the image
Returns:
new image (ownership is passed to the caller!)
static core::Img8u* icl::io::TestImages::internalCreate ( const std::string &  name) [static, private]

internal creation funtion for image

static void icl::io::TestImages::show ( const core::ImgBase image,
const std::string &  showCommand = "icl-xv -input %s -delete",
long  msec_to_rm_call = 0,
const std::string &  rmCommand = "" 
) [static]

writes the image to the hard disk and show it using the given shell command

Parameters:
imageimage to show
showCommandcommand to visualize the image. As default, the iclxv viewer of the ICLQt package is used. Enshure, that at least a link to this viewer is available in your path variable. A temporarily created filename (composed of a prefix, a current-system-time-body and a file name postfix is inserted where the s token is found
msec_to_rm_callwhen showing images using other image viewers, the temporarily created image must be deleted when the extern editor has read the image. This value determines how many milliseconds should be waited before the rmCommand is called.
rmCommandcommand to remove the temporary image (something like "rm -rf %s"
static void icl::io::TestImages::xv ( const core::ImgBase image,
const std::string &  tmpName = "./tmp_image.ppm",
long  msec_to_rm_call = 1000 
) [static]

writes the image to the disc an shows it using xv.

Parameters:
imageimage to write and to show
tmpNametemporary filename for this image
msec_to_rm_callthis time in msec is waited for xv to come up and to read the tmp image

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines