plotting dataObject into itom2DGVFigure

Issue #9 closed
Mark Holton created an issue

Hi Marc, hope all is well with you there.

I had a chat with Marc W' and he suggested putting a comment into here.

When displaying a camera image in an itom2DGVFigure, the pixel intensity is auto-scaled depending on the minimum/maximum value within the image matrix. If the matrix values are divided by two, one would normally expect (for a camera image anyway) for the image to be "half as bright" across the whole image. But with the auto-scaling in place, this can't occur. Would it be possible to add in some parameters within the QT Designer's Itom plugin, that could be accessed from Python. Then I can attach a value box, or a slider etc. to allow a user to adjust image contrast/brightness etc. that would manipulate the viewed plot... Visualization, adjusting contrast/brightness is very important for the camera work we do, as from a biological point of view, cells can be VERY hard to image on some microscopes (those without phase contrast etc.).

All the best from here in 'wet/cold/windy!' Wales


Comments (7)

  1. M. Gronle

    Hi Mark,
    right now, these properties are already available in a itom2DQwtPlot-figure. I will add them in the itom2DGVFigure as well. Inbetween, you can also use the itom2DQwtPlot with the properties xAxisInterval, ... (set the boundary values to 0.0 in order to have an auto-scale or to other values). Right now the lower value is called X and the upper value is Y - this is not the best caption, but ok ;)


  2. Mark Holton reporter

    Hi Marc, thanks for the info. I've replaced the previous itom2DGVFigure with a itom2DQwtPlot-figure and as you say, there is now a parameter for the plot called XAxisInterval, which, under QTDesigner, has components X and Y, much like geometry for the plot has X Y Width and Height.

    I can view the parameters for geometry using:

    --> [9, 9, 613, 490]

    Where: win_my_camera_window = ui("mycamerawindow.ui", ui.TYPEWINDOW, childOfMainWindow = True)

    But I get the following error with:

    -->Traceback (most recent call last):
    File "<string>", line 1, in <module>
    TypeError: The given Qt-type can not be parsed into an appropriate python type.

    Any ideas? Am I trying to reference it incorrectly?

    Marc says I should do a Bit-bucket sync at some point to gain access to some recent changes of yours that will allow me to set window position etc. in Python - many thanks for doing that. I'll do that either this evening or in work tomorrow.

    What I'm hoping to do some point in the next week or so is a complete re-install of that big laptop as Windows has some annoying issues right now which can only be solved that way. I'm just a little nervous that I won't be able to get all the stuff back up to the state you guys helped to achieve in August - VS2010/QT/etc.etc.... Has to be done sometime though I guess.



  3. M. Gronle

    Hi Mark,

    a bitbucket sync indeed is a good idea. In your specific case the property name is case sensitive, hence, xAxisInterval and not XAxisInterval. In the current version I improved the error message such that the real error is much clearer. Your error message is really strange and has also been replaced by a better one in one of the commits of the last months.

    If you save your python and ui files and maybe send me a zip-file with the sources of QCam, there is nothing that you can really loose when you update your windows system. I will merge the last version of QCam with the bitbucket version since I remember that we finally did some last changes on your laptop that we did not push to the repository on


  4. Mark Holton reporter

    Hi Marc,

    I tried all combinations of xAxisInterval / XAxisInterval/xaxisInterval etc. In Qt Designer, it's listed with 'XAxisInterval', whereas from your side you say it's xAxisInterval. If I remember correctly, when I used xAxisInterval it said something about not being able to create itom.ui or something to that effect, however, when I used XAxisInterval did it give the other message about not being able to parse it into an appropriate python type. I guess this is likely to be something to do with me using an old install of Itom and not the laptop more up-to-date version.

    I've now used GIT to push/pull and now have your demo and it works great! Many thanks for that.

    I still need to re-install Windows in the near future though (poor me!). But I won't be installing VS2012, just straight to VS2010 this time!!!



  5. Wolfram Lyda

    Hi Mark and Mark,

    the itom2DGVFigure was converted to GraphicViewPlot which has the property-based settings.

    Adding ROI to the plotting tool will still take some time so x-axis and y-axis are still not changeable.

    Best regards


  6. Log in to comment