VigraQt

File: vigraqt-0.4.tar.gz(441.8 kb; Thu, Apr/03/2008) download 'vigraqt-0.4.tar.gz' to disk
File: vigraqt4-0.4.1.tar.gz(30.43 kb; Tue, Apr/08/2008) download 'vigraqt4-0.4.1.tar.gz' to disk

What's this?

This package contains Qt bindings for VIGRA, version 0.4 for both Qt3 and Qt4 (support for the former will probably be discontinued). This includes:

You can also check out the mercurial repository as follows:

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

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

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: Can I zoom the image viewer to e.g. 40%?
A: No, it only supports powers of 2. This is mainly an API problem - floating point numbers are to be avoided for accuracy, and I would have used VIGRA's Rational class (which I could then have passed to resampleImage internally), but the qimageviewer.[ch]xx source files do not yet include any VIGRA headers, and I am hesitant to include them just for more flexible zooming.
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.
File: thresholder.tar.gz(2670 bytes; Thu, Jan/31/2008) download 'thresholder.tar.gz' to disk
File: imageAnalyzer-0.1.1.tar.gz(1920 bytes; Wed, Aug/22/2007) download 'imageAnalyzer-0.1.1.tar.gz' to disk
File: imageAnalyzer.qt4-0.2.tar.gz(4428 bytes; Mon, Apr/07/2008) download 'imageAnalyzer.qt4-0.2.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 "ImageAnalyzer" demonstrates the use of the color map (and nothing more, despite the name).

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

Changelog

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: Monday, August 11, 2008 hacker emblem