VigraQt

File: vigraqt4-0.6.tar.gz(37.58 kb; Tue, Mar/31/2009) download 'vigraqt4-0.6.tar.gz' to disk
File: vigraqt-0.4.tar.gz(441.8 kb; Thu, Apr/03/2008) download 'vigraqt-0.4.tar.gz' to disk

What's this?

This package contains Qt bindings for VIGRA. This includes:

You can also check out the mercurial repository as follows:

hg clone http://www.informatik.uni-hamburg.de/~meine/hg/VigraQt/

The latest available release for Qt version 3.x is VigraQt 0.4; active development currently happens only on the Qt4 version.

Installation

In contrast to earlier versions, starting with vigraqt4-0.4, the three components (the VigraQt library, the designer plugin, and the python bindings) are compiled and installed separately (the old, autotools-based build system was ditched, which accounts for the big difference in the download's filesizes..). This is not unlike with other, similar software packages (e.g. qwt) and probably makes sense:

For the VigraQt library itself, use qmake*:

qmake # optionally, add INSTALLBASE=/some/where
make
# copies the library and header files to subdirectores of
# INSTALLBASE (default: /usr/local):
make install

Similarly, you can install the designer plugin with:

cd src/designer-plugin
qmake
make
# copies the plugin into ${QT_PLUGINS}/designer
make install
[*]For MacOS, you might want to use qmake -spec macx-g++ if your default QMAKESPEC e.g. generates XCode project files. On Windows (in the absence of vigra-config), you can use cd src\vigraqt; qmake "INCLUDEPATH += c:\vigra\include" to specify the location of VIGRA's header files on the command line.

Finally, the Python bindings require PyQt and use its python-based build system:

cd src/sip
# optionally, add -m /your/python/site-packages:
python configure.py
make
make install # installs VigraQt.so into the module target dir (see above)

FAQ

Q: How do I display my VIGRA image?
A: With Qt, you need a QPixmap to display an image. A QPixmap represents a handle to an image known to the windowing system. It can be displayed (e.g. using a QLabel or directly with QPainter), but you cannot access the image data. At least under X, with the client-server separation, this is a consequence of the fact that the display happens in the server, so the pixmap lives in the X server. You (the X client) can only create/modify a QImage, which you can then convert to pixmaps (which internally means a client->server transfer of the image data). VigraQt allows you to use QImages as your native image representation for VIGRA algorithms, so that no extra copying is needed.
Q: Does the viewer widget support (bicubic/linear/...) interpolation?
A: No, QImageViewer purposely displays zoomed pixels as square blocks, since our interest is in image analysis, where we are not interested in the nicest possible display, but in visualizing the raw data our algorithms have to deal with.
Q: How can I visualize my numpy arrays as images from Python?
A: There is numpy.ndarray <-> QImage conversion code in my separate qimage2ndarray python extension.
File: thresholder.tar.gz(2670 bytes; Thu, Jan/31/2008) download 'thresholder.tar.gz' to disk
File: imageAnalyzer.qt3-0.1.1.tar.gz(1920 bytes; Wed, Aug/22/2007) download 'imageAnalyzer.qt3-0.1.1.tar.gz' to disk

Examples

Here are two very simple example programs, which hopefully show you how to use the VigraQt library. The "Thresholder" app actually stems from a Qt tutorial I did with a colleague in the past (and it is based on the Qt3 version). "ImageAnalyzer" demonstrates the use of the color map (and has no other analysis features, despite the name) and is now included in the Qt4 releases in the "example" directory under the name "colorize".

a screenshot of the Thresholder example application a screenshot showing the color map editor in the ImageAnalyzer example application

Changelog

31.3.2009 - Version 0.6
  • many fixes in QImageViewer, for instance: - cursor movement by keyboard - zooming in/out does no longer change the image/center position
  • improve OverlayViewer, e.g. allow for different coordinate systems
  • add ImageCursor overlay
  • export ColorMapEditor, OverlayViewer and Overlay to Python
  • DnD image loading in 'colorize' example
3.2.2009 - Version 0.5
  • big overhaul of the image viewer API: remove mouse button signals (using proper event listeners instead allows to mark an event as handled)
  • center image by default
  • zooming by mouse wheel
  • also use zoom factors that are powers of two, confine min/max zoom level
  • added autoZoom() method for nice initial zoom levels
  • proper symbol exporting and build on Windows
  • QImageViewer and ColorMapEditor inherit from QFrame (for frame handling)
  • added ColorMapGradient for displaying a color map (without editing)
  • added ColorMap base class for enabling color maps that are not using linear transitions
  • added one such color map (enhanced gray map)
8.4.2008 - Version 0.4.1
  • fixed some small bugs in the viewer after more Qt4 testing
  • added 'colorize' example (previously known as imageAnalyzer)
  • added READMEs
4.4.2008 - Version 0.4 for Qt4
  • ported VigraQt to Qt4 (can be installed in parallel with Qt3 version)
  • removed autotools-based build system (in favor of qmake, see above)
  • small ColorMap improvements
  • new: proper library versioning & headers in subdir (VigraQt/foo.hxx)
2.4.2008 - Version 0.4
  • improved ColorMap[Editor]:
    • handling of incident triangles (no crash if 3 triangles coincide)
    • refactoring, simpler code
  • GCC4 compatibility, bug fixes
  • add overlay viewer and simple overlay example class
22.8.2007
improved .pro files of the example apps
22.2.2006 - Version 0.3.2
changes in the build system only - hopefully making it possible for people to use --enable-python and get the python module built.
20.2.2006 - Version 0.3.1a
fix one compile error due to an ambiguous std::pow() call
9.2.2006 - Version 0.3.1
  • cleaned up the build system
  • fixed missing #include for pow()
8.2.2006 - Version 0.3
added a color map and a corresponding editor widget

Limitations

Some day, I tried to add support for using importImage() directly on color QImages like this:

#include <vigraqimage.hxx>
#include <vigra/accessor.hxx>
#include <vigra/impex.hxx>

int main(int argc, char **argv)
{
    vigra::ImageImportInfo info(argv[1]);

    vigra::QRGBImage in(info.width(), info.height());

    importImage(info, destImage(in, vigra::QRGBImage::RGBAccessor()));

    // ...

    QPixmap myPixmap;
    myPixmap.convertFromImage(in.qImage());

    // ...
}

However, it got pointed out that this still does not work, so I removed the patch from this page again. We have to start making VIGRA RGBA-aware, see the discussions on the mailing list ("New Pixel Types" threads started by Paul/"PTF" in April and September of 2005).


Valid XHTML 1.0! Valid CSS!
This page was last modified: Thursday, July 21, 2011 hacker emblem