Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Typedefs | Enumerations | Functions
icl::qt Namespace Reference

Classes

class  AbstractPlotWidget
 The PlotWidget is an abstract base class for 2D plotting components. More...
class  ICLApplication
 QApplication extension for ICL based applications. More...
struct  BorderBox
 A simple utility class (QWidget with titled border) More...
class  BorderHandle
 Handle class for "border" gui components (only for explicit "border" components) More...
class  BoxHandle
 A Handle for container GUI components (hbox, vbox, hscroll and vscroll) More...
class  ButtonGroupHandle
 Class for handling button goups. More...
class  ButtonHandle
 Special Utiltiy class for handling Button clicks in the ICL GUI API. More...
class  CamCfgWidget
 Special QWidget implementation for configuring grabber properties. More...
class  CheckBoxHandle
 Special Utiltiy class for handling Button clicks in the ICL GUI API. More...
class  ChromaClassifierIO
class  ChromaGUI
 Dedicated GUI component which can be used to adjust segmentation parameters. More...
class  ColorHandle
 Class wrapping ColorLabel GUI compoenent handling. More...
class  ColorLabel
 Utility class to avoid Qt warning when accesing QLabels from differnt Threads. More...
class  ComboHandle
 Handle class for combo components. More...
class  CompabilityLabel
 Utility class to avoid Qt warning when accesing QLabels from differnt Threads. More...
struct  ContainerGUIComponent
 Special GUI extension, that mimics the GUIComponent interface. More...
struct  HBox
 Horizonal Box container component. More...
struct  VBox
 Vertical Box container component. More...
struct  HScroll
 Horizontal scroll area. More...
struct  VScroll
 Vertical scroll area. More...
struct  HSplit
 Horizontal split-component. More...
struct  VSplit
 Vertical split-component. More...
struct  Tab
 Tab-compnent. More...
struct  Border
 internally used component More...
class  ContainerHandle
 Base class for Container like GUI handles as Box- or Tab widgets. More...
class  DataStore
 Extension of the associative container MultiTypeMap. More...
class  DefineQuadrangleMouseHandler
 Special MouseHandler Implementation that allows for defining a quadrangle. More...
class  DefineRectanglesMouseHandler
 Utility mouse handler implementation that allows to define rectangles via drag and drop. More...
class  DispHandle
 Handle class for disp components. More...
class  DoubleSlider
 A utiltiy class which implements a labeld, double valued QSlider. More...
struct  Dragger
 Utility class that implements draggable rects on the ChromaWidget surface. More...
class  DragRectangleMouseHandler
 Special MouseHandler implementation that allows for dragging a Rectangle. More...
class  DrawHandle
 Handle class for image components. More...
class  DrawHandle3D
 Handle class for image components. More...
class  ICLDrawWidget
 Extended Image visualization widget, with a drawing state machine interface. More...
class  ICLDrawWidget3D
 Extended ICLDrawWidget, able to draw 2D and 3D primitives using OpenGL. More...
class  FloatHandle
 Class for handling "float" textfield components. More...
class  FPSHandle
 Class for Frames-per-second GUI-Label. More...
class  FSliderHandle
 Handle class for slider componets. More...
class  GLContext
 Shallow Wrapper class around GLX and QGLContext instances. More...
class  GLFragmentShader
 Simple wrapper class for OpenGL 2.0 Fragment Shader Programs. More...
class  GLImg
 OpenGL Texture Map Image class. More...
class  GLPaintEngine
 Paint engine to be used in QGLWigets for a high performance image visualization. More...
class  GUI
 Main Class of ICL's GUI creation framework. More...
class  GUIComponent
 The GUIComponent class servers as a generic interface for GUI definitions. More...
struct  Button
 Button Component. More...
struct  ButtonGroup
 ButtonGroup component (aka vertical list of radio buttons) More...
struct  CheckBox
 CheckBox component. More...
struct  Label
 Label component for displaying text. More...
struct  Slider
 Slider component for int-ranges. More...
struct  FSlider
 Float-valued Slider component. More...
struct  Int
 Text Input component, that allows integer inputs in a given range. More...
struct  Float
 Text Input component, that allows float inputs in a given range. More...
struct  String
 Text Input component, that allows float inputs with a given maximun length. More...
struct  Disp
 Display component for a 2D Array of labels. More...
struct  Image
 Image visualization component. More...
struct  Draw
 Image visualization component that allows for overlayed 2D image annotation. More...
struct  Draw3D
 Image visualization compoent that allows for 2D and 3D image annotation. More...
struct  Plot
 a 2D function and data plotting component More...
struct  Combo
 ComboBox GUI component. More...
struct  Spinner
 SpinBox component. More...
struct  Fps
 Frames per second estimator component. More...
struct  CamCfg
 camera configuration component More...
struct  Prop
 Propery adjustment component for configuable instances. More...
struct  ColorSelect
 Color selection component. More...
struct  Ps
 Process status component. More...
struct  Dummy
 Creates not component. More...
struct  Show
 Finalizes GUI creation (actually creates the Qt-GUI and makes it visible) More...
struct  Create
 Finalizes GUI creation (actually creates the Qt-GUI but initially hidden) More...
struct  GUIComponentWithOutput
class  GUIDefinition
 Utilty class to simplify creation of GUI components. More...
class  GUIHandle
 Abstract base class for Handle classes. More...
class  GUIHandleBase
 Base class for GUIHandles providing functions to register callbacks. More...
class  GUISyntaxErrorException
 Internally used and caught exception class for the GUI API. More...
class  GUIWidget
 Abstract class for GUI components. More...
struct  HistogrammWidget
 Utility class used within the ICLWidget class. More...
class  IconFactory
 Simple utility class providing static functions to create some icons. More...
class  ImageHandle
 Handle class for image components. More...
struct  ImageStatistics
class  ImgParamWidget
 Internally used widget to define image params. More...
class  IntHandle
 Class for handling "int" textfield components. More...
class  LabelHandle
 Class for GUI-Label handling. More...
class  LowLevelPlotWidget
 Default AbstractPlotWidget implementation for plotting different kinds of data. More...
class  MouseEvent
 Provided by interface MouseGrabber. More...
class  MouseHandler
 MouseEvent Handler. More...
class  MultiDrawHandle
 Handle class for image components. More...
class  PaintEngine
 pure virtual Paint engine interface More...
class  PlotHandle
 Handle class for image components. More...
class  PlotWidget
 Easy to use widget component for 2D data visualization. More...
class  ProxyLayout
 just a helper class for GUI Layouting More...
class  QImageConverter
 class for conversion between QImage and core::ImgBase/Img<T> More...
struct  ImgROI
 internal stuct, used for deep image copies More...
class  SliderHandle
 Handle class for slider componets. More...
struct  SliderUpdateEvent
 Utility class for threaded updatable sliders. More...
class  SpinnerHandle
 Handle class for spinner components. More...
class  SplitterHandle
 A Handle for SplitterWidget container GUI components. More...
class  StateHandle
 Class for GUI-Label handling a so called state component. More...
class  StringHandle
 Class for handling "string" textfield components. More...
class  StringSignalButton
 internally used button that emits a signal with its text More...
class  TabHandle
 A Handle for TabWidget container GUI components. More...
class  ThreadedUpdatableSlider
 Compability class. More...
class  ThreadedUpdatableTextView
class  ThreadedUpdatableWidget
 Compability class. More...
class  ToggleButton
class  ICLWidget
 Class for openGL-based image visualization components. More...

Typedefs

typedef ICLApplication ICLApp
 this is just a shortcut typedef
typedef std::vector
< QRadioButton * > 
RadioButtonVec
 type definition for the ButtonGroup handle
typedef utils::Array2D
< LabelHandle
LabelMatrix
 Type definition for handling GUI-"disp" components.
typedef core::Img< ICL_QUICK_TYPEImgQ
 typedef for the quick images type (this time core::Img<icl32f>)

Enumerations

enum  MouseEventType {
  MouseMoveEvent = 0, MouseDragEvent = 1, MousePressEvent = 2, MouseReleaseEvent = 3,
  MouseEnterEvent = 4, MouseLeaveEvent = 5, MouseWheelEvent = 6, MAX_MOUSE_EVENT = MouseWheelEvent
}
 list of supported mouse event types More...
enum  MouseButton { LeftMouseButton = 0, MiddleMouseButton = 1, RightMouseButton = 2, MAX_MOUSE_BUTTON = RightMouseButton }
 list of supported mouse buttons More...
enum  KeyboardModifier {
  NoModifier = Qt::NoModifier, ShiftModifier = Qt::ShiftModifier, ControlModifier = Qt::ControlModifier, AltModifier = Qt::AltModifier,
  MetaModifier = Qt::MetaModifier, KeypadModifier = Qt::KeypadModifier, GroupSwitchModifier = Qt::GroupSwitchModifier
}
enum  ICLWidgetCaptureMode { capturingStarted, capturingStopped, capturingPaused }

Functions

std::string openFileDialog (const std::string &filter="", const std::string &caption="open file", const std::string &initialDirectory="", void *parentWidget=0) throw (utils::ICLException)
 uses Qt to spawn an open-file dialog with given filter
std::string saveFileDialog (const std::string &filter="", const std::string &caption="save file", const std::string &initialDirectory="", void *parentWidget=0) throw (utils::ICLException)
 uses Qt to spawn a save-file dialog with given filter
std::string execute_process (const std::string &command)
 executes the given command as a child process and returns it output

creator functions

template<class T >
core::Img< T > zeros (int width, int height, int channels=1)
 create an empty (black) ImgQ (affinity for floats)
template<class T >
core::Img< T > ones (int width, int height, int channels=1)
 create an ImgQ that is pre-initialized with ones (affinity for floats)
template<class T >
core::Img< T > load (const std::string &filename)
 load an image file read file (affinity for floats)
template<class T >
core::Img< T > load (const std::string &filename, core::format fmt)
 loads an image file and returns image in given core::format (affinity for floats)
template<class T >
core::Img< T > create (const std::string &name, core::format fmt=formatRGB)
 create a test image (converted to destination core::format) (affinity for floats)
template<class T >
core::Img< T > grab (const std::string &dev, const std::string &devSpec, const utils::Size &size=utils::Size::null, core::format fmt=formatRGB, bool releaseGrabber=false)
 grabs a new image from given device (affinity for floats)

converting function

core::Img8u cvt8u (const ImgQ &image)
 Converts the image into depth8u.
core::Img16s cvt16s (const ImgQ &image)
 Converts the image into depth16.
core::Img32s cvt32s (const ImgQ &image)
 Converts the image into depth32s.
core::Img32f cvt32f (const ImgQ &image)
 Converts the image into depth32f.
core::Img64f cvt64f (const ImgQ &image)
 Converts the image into depth64f.
ImgQ cvt (const core::Img8u &image)
 Converts a given core::Img8u into an ImgQ.
ImgQ cvt (const core::ImgBase *image)
 Converts a given core::ImgBase into an ImgQ.
ImgQ cvt (const core::ImgBase &image)
 Converts a given core::ImgBase into an ImgQ.

filtering function

template<class T >
core::Img< T > filter (const core::Img< T > &image, const std::string &filter)
 applies a filter operation on the source image (affinity for float)
template<class T >
core::Img< T > blur (const core::Img< T > &image, int maskRadius=1)
 applies gaussian blur to a given image (using a maskRadius*2+1-sized gaussian filter)
ImgQ cc (const ImgQ &image, core::format fmt)
 applies a color conversion
ImgQ rgb (const ImgQ &image)
 converts a given image to formatRGB
ImgQ hls (const ImgQ &image)
 converts a given image to formatHLS
ImgQ lab (const ImgQ &image)
 converts a given image to formatLAB
ImgQ gray (const ImgQ &image)
 converts a given image to formatGray
ImgQ scale (const ImgQ &image, float factor)
 scales an image by a given factor
ImgQ scale (const ImgQ &image, int width, int height)
 scales an image to the given size
ImgQ channel (const ImgQ &image, int channel)
 picks a specific image channel
ImgQ levels (const ImgQ &image, icl8u levels)
 reduces an images quantisation levels
ImgQ thresh (const ImgQ &image, float threshold)
 performs an image binarisation for each channel with given threshold
template<class T >
core::Img< T > copy (const core::Img< T > &image)
 deep copy for an image
template<class T >
core::Img< T > copyroi (const core::Img< T > &image)
 deep copy of an images roi
template<class T >
core::Img< T > norm (const core::Img< T > &image)
 normalize an images range to [0,255]
ImgQ flipx (const ImgQ &image)
 horizontal flip of an image
ImgQ flipy (const ImgQ &image)
 vertical flip of an image

output functions

void save (const core::ImgBase &image, const std::string &filename)
 write an image to HD
void show (const ImgBase &image)
 shows an image using TestImages::show
void showSetup (const string &showCommand="xv %s", const string &rmCommand="rm -rf %s", int msecBeforeDelete=500)
 setup image visualisation programm
template<class T >
void print (const core::Img< T > &image)
 print the images parameters to std::out

ImgQ arithmetical operators

ImgQ operator+ (const ImgQ &a, const ImgQ &b)
 adds two images pixel-wise
ImgQ operator- (const ImgQ &a, const ImgQ &b)
 subtracts two images pixel-wise
ImgQ operator* (const ImgQ &a, const ImgQ &b)
 multiplies two images pixel-wise
ImgQ operator/ (const ImgQ &a, const ImgQ &b)
 divides two images pixel-wise
ImgQ operator+ (const ImgQ &image, float val)
 adds a constant to each pixel value
ImgQ operator- (const ImgQ &image, float val)
 subtracts a constant to each pixel value
ImgQ operator* (const ImgQ &image, float val)
 multiplies each pixel value with a constant
ImgQ operator/ (const ImgQ &image, float val)
 divides each pixel value by a constant
ImgQ operator+ (float val, const ImgQ &image)
 adds a constant to each pixel value
ImgQ operator- (float val, const ImgQ &image)
 subtracts each pixel value from a constant
ImgQ operator* (float val, const ImgQ &image)
 multiplies each pixel value with a constant
ImgQ operator/ (float val, const ImgQ &image)
 divides a constant by each pixel value
ImgQ operator- (const ImgQ &image)
 returns image*(-1)

ImgQ arithmetical functions

ImgQ exp (const ImgQ &image)
 calls exp( each pixel )
ImgQ ln (const ImgQ &image)
 calls ln( each pixel )
ImgQ sqr (const ImgQ &image)
 calls ( each pixel )²
ImgQ sqrt (const ImgQ &image)
 calls sqrt( each pixel)
ImgQ abs (const ImgQ &image)
 calls abs ( each pixel)

ImgQ logical operators

ImgQ operator|| (const ImgQ &a, const ImgQ &b)
 pixel-wise logical or
ImgQ operator&& (const ImgQ &a, const ImgQ &b)
 pixel-wise logical and
template<class T >
ImgQ binOR (const ImgQ &a, const ImgQ &b)
 pixels-wise binary or (each value is converted to T brefore binary or)
template<class T >
ImgQ binXOR (const ImgQ &a, const ImgQ &b)
 pixels-wise binary or (each value is converted to T brefore binary or)
template<class T >
ImgQ binAND (const ImgQ &a, const ImgQ &b)
 pixels-wise binary or (each value is converted to T brefore binary or)

ImgQ concatenation operators

ImgQ operator, (const ImgQ &a, const ImgQ &b)
 horizontal image concatenation
ImgQ operator% (const ImgQ &a, const ImgQ &b)
 vertical image combination (as ,-operator)
ImgQ operator| (const ImgQ &a, const ImgQ &b)
 channel concatenation of images

ImgQ roi copy

ImgROI roi (ImgQ &r)
 creates a ROI-struct from an image
ImgROI data (ImgQ &r)
 creates full ROI ROI-struct

drawing functions

void color (float r, float g=-1, float b=-1, float alpha=255)
 sets the current color to given r,g,b,alpha value
void fill (float r, float g=-1, float b=-1, float alpha=255)
 sets the current fill color to given r,g,b,alpha value
void colorinfo (float color[4], float fill[4])
 returns the current color state
void cross (ImgQ &image, int x, int y)
 draws a 6x6-cross into an image
void cross (ImgQ &image, const utils::Point &p)
 draws a 6x6-cross into an image
void rect (ImgQ &image, int x, int y, int w, int h, int rounding=0)
 draws a rect into an image
void rect (ImgQ &image, const utils::Rect &r, int rounding=0)
 draws a rect into an image
void triangle (ImgQ &image, int x1, int y1, int x2, int y2, int x3, int y3)
 draws a triangle into an image
void triangle (ImgQ &image, const utils::Point &a, const utils::Point &b, const utils::Point &c)
 draws a triangle into an image
void line (ImgQ &image, int x1, int y1, int x2, int y2)
 draws a line into an image
void line (ImgQ &image, const utils::Point &p1, const utils::Point &p2)
 draws a line into an image
void linestrip (ImgQ &image, const std::vector< utils::Point > &pts, bool closeLoop=true)
 draws a strip of connected lines
void polygon (ImgQ &image, const std::vector< utils::Point > &corners)
 draws a polygon (constructed out of linestrips
void pix (ImgQ &image, int x, int y)
 draw a single pixel into an image
void pix (ImgQ &image, const utils::Point &p)
 draw a single pixel into an image
void pix (ImgQ &image, const vector< utils::Point > &pts)
 draws a set of points into an image
void pix (ImgQ &image, const vector< vector< utils::Point > > &pts)
 draws a set of point sets into an image
void circle (ImgQ &image, int x, int y, int r)
 renders a filled circle into an image
void text (ImgQ &image, int x, int y, const string &text)
 renders a text into an image (only available with Qt-Support)
void text (ImgQ &image, const utils::Point &p, const string &sText)
 renders a text into an image (only available with Qt-Support)
ImgQ label (const ImgQ &image, const string &text)
 labels an image in the upper left corner (only available with Qt-Support)
void font (int size, const string &family="Arial")
 sets up the current font (only available with Qt-Support)
void fontsize (int size)
 sets up current fontsize (only available with Qt-Support)

timer and benchmarking

void tic (const std::string &label="")
 starts a timer
void toc ()
 stops a timer started with tic()

Detailed Description


Typedef Documentation

this is just a shortcut typedef

typedef for the quick images type (this time core::Img<icl32f>)


Enumeration Type Documentation

Enumerator:
capturingStarted 
capturingStopped 
capturingPaused 
Enumerator:
NoModifier 

No modifier key is pressed.

ShiftModifier 

A Shift key on the keyboard is pressed.

ControlModifier 

A Ctrl key on the keyboard is pressed.

AltModifier 

An Alt key on the keyboard is pressed.

MetaModifier 

A Meta key on the keyboard is pressed.

KeypadModifier 

A keypad button is pressed.

GroupSwitchModifier 

X11 only. A Mode_switch key on the keyboard is pressed.

list of supported mouse buttons

when ever you'll find a bool downmaks[3], buttons are arranged by this enum order

Enumerator:
LeftMouseButton 

left mouse button

MiddleMouseButton 

middle mouse button

RightMouseButton 

right moouse button

MAX_MOUSE_BUTTON 

highest enum value (enum value count = MAX_MOUSE_BUTTON + 1)

list of supported mouse event types

Enumerator:
MouseMoveEvent 

mouse moved

MouseDragEvent 

mouse button pressed down and held

MousePressEvent 

mouse button pressed

MouseReleaseEvent 

mouse button released

MouseEnterEvent 

mouse entered area

MouseLeaveEvent 

mouse left area

MouseWheelEvent 

mouse wheel

MAX_MOUSE_EVENT 

highest enum value (enum value count = MAX_MOUSE_EVENT + 1)


Function Documentation

ImgQ icl::qt::abs ( const ImgQ image)

calls abs ( each pixel)

Parameters:
imagesource image
template<class T >
ImgQ icl::qt::binAND ( const ImgQ a,
const ImgQ b 
)

pixels-wise binary or (each value is converted to T brefore binary or)

template<class T >
ImgQ icl::qt::binOR ( const ImgQ a,
const ImgQ b 
)

pixels-wise binary or (each value is converted to T brefore binary or)

template<class T >
ImgQ icl::qt::binXOR ( const ImgQ a,
const ImgQ b 
)

pixels-wise binary or (each value is converted to T brefore binary or)

template<class T >
core::Img<T> icl::qt::blur ( const core::Img< T > &  image,
int  maskRadius = 1 
)

applies gaussian blur to a given image (using a maskRadius*2+1-sized gaussian filter)

affinity for floats

ImgQ icl::qt::cc ( const ImgQ image,
core::format  fmt 
)

applies a color conversion

Parameters:
imagesource image*
fmtdestination image format
ImgQ icl::qt::channel ( const ImgQ image,
int  channel 
)

picks a specific image channel

Parameters:
imagesource image
channelchannel index to pick
void icl::qt::circle ( ImgQ image,
int  x,
int  y,
int  r 
)

renders a filled circle into an image

This function renders a filled circle into a 3 or 1 channel image (only with fill color!) using a QPainter internally.

Parameters:
imagedestination image
xx-pos of the circle center
yx-pos of the circle center
rradius of the circle
void icl::qt::color ( float  r,
float  g = -1,
float  b = -1,
float  alpha = 255 
)

sets the current color to given r,g,b,alpha value

Parameters:
rred value
ggreen value (if < 0, g is set to r)
bblue value (if < 0, b is set to r)
alphaalpha value 255 = no transparency, 0 = full transparency
void icl::qt::colorinfo ( float  color[4],
float  fill[4] 
)

returns the current color state

Parameters:
colordestintaion array for the current draw color
filldestinaion array for the current fill color
template<class T >
core::Img<T> icl::qt::copy ( const core::Img< T > &  image)

deep copy for an image

Parameters:
imagesource image
template<class T >
core::Img<T> icl::qt::copyroi ( const core::Img< T > &  image)

deep copy of an images roi

Parameters:
imagesource image
template<class T >
core::Img<T> icl::qt::create ( const std::string &  name,
core::format  fmt = formatRGB 
)

create a test image (converted to destination core::format) (affinity for floats)

Parameters:
nameidentifier for the image: names are: parrot, lena, cameraman, mandril, windows, flowers, women, house and tree
fmtimage core::format to convert the result to
void icl::qt::cross ( ImgQ image,
int  x,
int  y 
)

draws a 6x6-cross into an image

Parameters:
imagedestination image
xx-pos of the cross
yy-pos of the cross
void icl::qt::cross ( ImgQ image,
const utils::Point p 
) [inline]

draws a 6x6-cross into an image

Parameters:
imagedestination image
pposition
ImgQ icl::qt::cvt ( const core::Img8u image)

Converts a given core::Img8u into an ImgQ.

Parameters:
imagesource image
Returns:
converted image
ImgQ icl::qt::cvt ( const core::ImgBase image)

Converts a given core::ImgBase into an ImgQ.

Parameters:
imagesource image
Returns:
conveted image
ImgQ icl::qt::cvt ( const core::ImgBase image)

Converts a given core::ImgBase into an ImgQ.

Parameters:
imagesource image
Returns:
conveted image
core::Img16s icl::qt::cvt16s ( const ImgQ image)

Converts the image into depth16.

Parameters:
imagesource image
Returns:
converted image
core::Img32f icl::qt::cvt32f ( const ImgQ image)

Converts the image into depth32f.

Parameters:
imagesource image
Returns:
converted image
core::Img32s icl::qt::cvt32s ( const ImgQ image)

Converts the image into depth32s.

Parameters:
imagesource image
Returns:
converted image
core::Img64f icl::qt::cvt64f ( const ImgQ image)

Converts the image into depth64f.

Parameters:
imagesource image
Returns:
converted image
core::Img8u icl::qt::cvt8u ( const ImgQ image)

Converts the image into depth8u.

Parameters:
imagesource image
Returns:
converted image

creates full ROI ROI-struct

this can also be used for deep copies

        ImgQ a,b;
        a = aaa    b = bBBBb ( B = ROI pixel )
            aaa        bBBBb ( b = no ROI pixel )
            aaa        bBBBb
                       bbbbb
        data(a) = roi(b)
        a = BBB
            BBB
            BBB
        equal to:
        or a = copyroi(b) // this will release a and reallocate its data 
        
Parameters:
rimage to wrap
std::string icl::qt::execute_process ( const std::string &  command)

executes the given command as a child process and returns it output

Internally, popen is used

ImgQ icl::qt::exp ( const ImgQ image)

calls exp( each pixel )

Parameters:
imagesource image
void icl::qt::fill ( float  r,
float  g = -1,
float  b = -1,
float  alpha = 255 
)

sets the current fill color to given r,g,b,alpha value

Parameters:
rred value
ggreen value (if < 0, g is set to r)
bblue value (if < 0, b is set to r)
alphaalpha value 255 = no transparency, 0 = full transparency
template<class T >
core::Img<T> icl::qt::filter ( const core::Img< T > &  image,
const std::string &  filter 
)

applies a filter operation on the source image (affinity for float)

Parameters:
imagesource image
filterfilter name, possible: sobelx, sobely, gauss, laplacs, median, dilation,erosion, opening and closing
ImgQ icl::qt::flipx ( const ImgQ image)

horizontal flip of an image

Parameters:
imagesource image
ImgQ icl::qt::flipy ( const ImgQ image)

vertical flip of an image

Parameters:
imagesource image
void icl::qt::font ( int  size,
const string &  family = "Arial" 
)

sets up the current font (only available with Qt-Support)

Parameters:
sizenew font size 12 by default
familyfont family string "Arial" by default
void icl::qt::fontsize ( int  size)

sets up current fontsize (only available with Qt-Support)

Parameters:
sizenew font size (default is 12)
template<class T >
core::Img<T> icl::qt::grab ( const std::string &  dev,
const std::string &  devSpec,
const utils::Size size = utils::Size::null,
core::format  fmt = formatRGB,
bool  releaseGrabber = false 
)

grabs a new image from given device (affinity for floats)

Parameters:
devdevice driver type (see Generic Grabber for more details)
devSpecdevice specifier
sizeoutput image size (grabbers size if utils::Size::null)
fmtoutput format
releaseGrabberif set to true, the correspondig grabbers are deleted immediately
ImgQ icl::qt::gray ( const ImgQ image)

converts a given image to formatGray

Parameters:
imagesource image
ImgQ icl::qt::hls ( const ImgQ image)

converts a given image to formatHLS

Parameters:
imagesource image
ImgQ icl::qt::lab ( const ImgQ image)

converts a given image to formatLAB

Parameters:
imagesource image
ImgQ icl::qt::label ( const ImgQ image,
const string &  text 
)

labels an image in the upper left corner (only available with Qt-Support)

Parameters:
imageimage to label
texttext label
Returns:
labeled source image (= given image)
ImgQ icl::qt::levels ( const ImgQ image,
icl8u  levels 
)

reduces an images quantisation levels

Internally the image is coverted to core::Img8u and back to apply this operation.

Parameters:
imagesource image
levelsgray level count for each channel of the destination image
void icl::qt::line ( ImgQ image,
int  x1,
int  y1,
int  x2,
int  y2 
)

draws a line into an image

Parameters:
imagedestination image
x1fist point x coord
y1fist point y coord
x2second point x coord
y2second point y coord
void icl::qt::line ( ImgQ image,
const utils::Point p1,
const utils::Point p2 
) [inline]

draws a line into an image

Parameters:
imagedestination image
p1fist point
p2second point
void icl::qt::linestrip ( ImgQ image,
const std::vector< utils::Point > &  pts,
bool  closeLoop = true 
)

draws a strip of connected lines

Parameters:
imagedestination image
ptslist of points
closeLoopif true, then also the first and the last point is connected
ImgQ icl::qt::ln ( const ImgQ image)

calls ln( each pixel )

Parameters:
imagesource image
template<class T >
core::Img<T> icl::qt::load ( const std::string &  filename)

load an image file read file (affinity for floats)

Parameters:
filenamefilename/pattern to read
template<class T >
core::Img<T> icl::qt::load ( const std::string &  filename,
core::format  fmt 
)

loads an image file and returns image in given core::format (affinity for floats)

Parameters:
filenamefilename to read (*.jpg, *.ppm, *.pgm)
fmtimage core::format to convert the result to
template<class T >
core::Img<T> icl::qt::norm ( const core::Img< T > &  image)

normalize an images range to [0,255]

Parameters:
imagesource image
template<class T >
core::Img<T> icl::qt::ones ( int  width,
int  height,
int  channels = 1 
)

create an ImgQ that is pre-initialized with ones (affinity for floats)

Parameters:
widthimage width
heightimage height
channelsimage channel count
std::string icl::qt::openFileDialog ( const std::string &  filter = "",
const std::string &  caption = "open file",
const std::string &  initialDirectory = "",
void *  parentWidget = 0 
) throw (utils::ICLException)

uses Qt to spawn an open-file dialog with given filter

throws an exception if cancel was pressed

ImgQ icl::qt::operator% ( const ImgQ a,
const ImgQ b 
)

vertical image combination (as ,-operator)

Parameters:
aupper image
blower image
ImgQ icl::qt::operator&& ( const ImgQ a,
const ImgQ b 
)

pixel-wise logical and

Parameters:
afirst source image
bsecond source image
ImgQ icl::qt::operator* ( const ImgQ a,
const ImgQ b 
)

multiplies two images pixel-wise

Parameters:
afirst source image
bsecond source image
ImgQ icl::qt::operator* ( const ImgQ image,
float  val 
)

multiplies each pixel value with a constant

Parameters:
imagesource image
valconst multiplication value
ImgQ icl::qt::operator* ( float  val,
const ImgQ image 
)

multiplies each pixel value with a constant

Parameters:
imagesource image
valconst multiplication value
ImgQ icl::qt::operator+ ( const ImgQ a,
const ImgQ b 
)

adds two images pixel-wise

Parameters:
afirst source image
bsecond source image
ImgQ icl::qt::operator+ ( const ImgQ image,
float  val 
)

adds a constant to each pixel value

Parameters:
imagesource image
valconst addition value
ImgQ icl::qt::operator+ ( float  val,
const ImgQ image 
)

adds a constant to each pixel value

Parameters:
imagesource image
valconst addition value
ImgQ icl::qt::operator, ( const ImgQ a,
const ImgQ b 
)

horizontal image concatenation

        example: ImgQ a,b,c;
        a=aaa  b = bbbbb   
          aaa      bbbbb
          aaa
        c = a,b,a;
        c = aaabbbbbaaa
            aaabbbbbaaa
            aaa00000aaa
        

empty spaces are set to 0;

Parameters:
aleft image
bright image
ImgQ icl::qt::operator- ( const ImgQ a,
const ImgQ b 
)

subtracts two images pixel-wise

Parameters:
afirst source image
bsecond source image
ImgQ icl::qt::operator- ( const ImgQ image,
float  val 
)

subtracts a constant to each pixel value

Parameters:
imagesource image
valconst subtraction value
ImgQ icl::qt::operator- ( float  val,
const ImgQ image 
)

subtracts each pixel value from a constant

Parameters:
imagesource image
valconst left value for subtraction
ImgQ icl::qt::operator- ( const ImgQ image)

returns image*(-1)

Parameters:
imagesource image
ImgQ icl::qt::operator/ ( const ImgQ a,
const ImgQ b 
)

divides two images pixel-wise

Parameters:
afirst source image
bsecond source image
ImgQ icl::qt::operator/ ( const ImgQ image,
float  val 
)

divides each pixel value by a constant

Parameters:
imagesource image
valconst division value
ImgQ icl::qt::operator/ ( float  val,
const ImgQ image 
)

divides a constant by each pixel value

Parameters:
imagesource image
valnominator for the division operation
ImgQ icl::qt::operator| ( const ImgQ a,
const ImgQ b 
)

channel concatenation of images

Parameters:
afirst image (channels f1,f2,f3,...)
bsecond image (channels s2, s2,s3,...)
Returns:
image with channels (f1,f2,... s1, s2, ...)
ImgQ icl::qt::operator|| ( const ImgQ a,
const ImgQ b 
)

pixel-wise logical or

Parameters:
afirst source image
bsecond source image
void icl::qt::pix ( ImgQ image,
int  x,
int  y 
)

draw a single pixel into an image

Parameters:
imagedestination image
xxpos of the pixel
yypos of the pixel
void icl::qt::pix ( ImgQ image,
const utils::Point p 
) [inline]

draw a single pixel into an image

Parameters:
imagedestination image
ppos of the pixel
void icl::qt::pix ( ImgQ image,
const vector< utils::Point > &  pts 
)

draws a set of points into an image

Parameters:
imagedestination image
ptsvector of points
void icl::qt::pix ( ImgQ image,
const vector< vector< utils::Point > > &  pts 
)

draws a set of point sets into an image

Parameters:
imagedestination image
ptsvector of vector of points to draw
void icl::qt::polygon ( ImgQ image,
const std::vector< utils::Point > &  corners 
)

draws a polygon (constructed out of linestrips

template<class T >
void icl::qt::print ( const core::Img< T > &  image)

print the images parameters to std::out

Parameters:
imageimage to print to std::out
void icl::qt::rect ( ImgQ image,
int  x,
int  y,
int  w,
int  h,
int  rounding = 0 
)

draws a rect into an image

Parameters:
imagedestination image
xx-pos of the rect
yx-pos of the rect
wwidth of the rect
hheight of the rect
roundingrounded corners (in pixels)
void icl::qt::rect ( ImgQ image,
const utils::Rect r,
int  rounding = 0 
) [inline]

draws a rect into an image

Parameters:
imagedestination image
rrect to draw
roundingrounded corners (in pixels)
ImgQ icl::qt::rgb ( const ImgQ image)

converts a given image to formatRGB

Parameters:
imagesource image

creates a ROI-struct from an image

This function helps to copy images ROIs:

        ImgQ a,b;
        a = aaaaa (A = ROI pixel)
            aaAAA (a = no ROI pixel)
            aaAAA
        b = bbb
            bbb
        roi(a) = b;
        a = aaaaa
            aabbb
            aabbb
        also possible: roi(a) = roi(b);
        
Parameters:
rimage to wrap
void icl::qt::save ( const core::ImgBase image,
const std::string &  filename 
)

write an image to HD

Parameters:
imagesource image
filenamefilename to write the image to.
std::string icl::qt::saveFileDialog ( const std::string &  filter = "",
const std::string &  caption = "save file",
const std::string &  initialDirectory = "",
void *  parentWidget = 0 
) throw (utils::ICLException)

uses Qt to spawn a save-file dialog with given filter

throws an exception if cancel was pressed

ImgQ icl::qt::scale ( const ImgQ image,
float  factor 
)

scales an image by a given factor

Parameters:
imagesource image
factorscale factor
ImgQ icl::qt::scale ( const ImgQ image,
int  width,
int  height 
)

scales an image to the given size

Parameters:
imagesource image
widthdestination image width
heightdestination image height
void icl::qt::show ( const ImgBase image)

shows an image using TestImages::show

The image is wrote to disk into a temporary file. Then it is shown using a specifi show command, which can be set, using the the showSetup function, which is also available in this package.

Parameters:
imageimage to show
See also:
showSetput(const string&, const stirng&, int)
void icl::qt::showSetup ( const string &  showCommand = "xv %s",
const string &  rmCommand = "rm -rf %s",
int  msecBeforeDelete = 500 
)

setup image visualisation programm

when images are shown using an extrenal viewer like gnu's xv, the image is temporarily written to the hard disk. Then the show command is called. Before the rmCommand is called usleep(1000*msecBeforeDelete); is called, to ensure, that the viewer has read the image completely. By default, the "iclxv" image viewer is used, which is available as example of the ICLQt package. In this case, the showCommand is "iclxv -input %s -delete". As iclxv automatically deletes the image, when it was read, the rmCommand is empty and the wait time is 0. To use this, you have to place at least a link to ICLQt/examples/iclxv into any directory contained in your path variable.

See also:
show
ICLIO/TestImages
ImgQ icl::qt::sqr ( const ImgQ image)

calls ( each pixel )²

Parameters:
imagesource image
ImgQ icl::qt::sqrt ( const ImgQ image)

calls sqrt( each pixel)

Parameters:
imagesource image
void icl::qt::text ( ImgQ image,
int  x,
int  y,
const string &  text 
)

renders a text into an image (only available with Qt-Support)

This functin renders a text into a 3 or 1 channel image using the a QPainter internally.

Parameters:
imagedestination image
xxpos of the lower left corner of the text
yypos of the lower left corner of the text
texttext to render
void icl::qt::text ( ImgQ image,
const utils::Point p,
const string &  sText 
) [inline]

renders a text into an image (only available with Qt-Support)

This functin renders a text into an 3 or 1 channel image using the a QPainter internally.

Parameters:
imagedestination image
ppos of the lower left corner of the text
sTexttext to render
ImgQ icl::qt::thresh ( const ImgQ image,
float  threshold 
)

performs an image binarisation for each channel with given threshold

Parameters:
imagesource image
thresholdthreshold to compare each pixel with
void icl::qt::tic ( const std::string &  label = "")

starts a timer

void icl::qt::toc ( )

stops a timer started with tic()

void icl::qt::triangle ( ImgQ image,
int  x1,
int  y1,
int  x2,
int  y2,
int  x3,
int  y3 
)

draws a triangle into an image

given 3 points (x1,y1),(x2,y2),(x3,y3)

void icl::qt::triangle ( ImgQ image,
const utils::Point a,
const utils::Point b,
const utils::Point c 
) [inline]

draws a triangle into an image

template<class T >
ImgQ icl::qt::zeros ( int  width,
int  height,
int  channels = 1 
) [inline]

create an empty (black) ImgQ (affinity for floats)

Parameters:
widthimage width
heightimage height
channelsimage channel count
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines