Discussion:
[guidata/guiqwt] guiqwt progammable zoom
Gilles Bordas
2014-12-11 16:35:38 UTC
Permalink
Hello
With guiqwt I display CCD camera images.
I would like to know if it is possible to program the guiqwt zoom tool for
displaying 1 pixel on my screen equal to 1 pixel of my camera's ccd sensor ?
In fact I mean 1 pixel in my guiqwt plot area correspond to 1 point (x,y,z)
of my data array.

Regards
Gilles
--
You received this message because you are subscribed to the Google Groups "guidata/guiqwt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to guidata_guiqwt+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Russ Berg
2014-12-12 17:55:38 UTC
Permalink
Hi Gilles,
I’m not exactly sure what you are asking in regards to the zoom tool but if your goal is to display your image in the same resolution as your ccd you should only need to set the image parameters (ImageParam and ImageAxesParam) of your image Item when you first create your image, I wrote the following to do this:

def set_image_parameters(self, imgItem, xmin, xmax, ymin, ymax):

ImageParam:
Image title: Image
Alpha channel: False
Global alpha: 1.0
Colormap: gist_gray
Interpolation: None (nearest pixel)
_formats:
X-Axis: %.1f
Y-Axis: %.1f
Z-Axis: %.1f
Background color: #000000
_xdata:
x|min: -
x|max: -
_ydata:
y|min: -
y|max: -

"""
iparam = ImageParam()
iparam.xmin = xmin
iparam.ymin = ymin
iparam.xmax = xmax
iparam.ymax = ymax
self.zoom_rngx = float(xmax - xmin)
self.zoom_rngy = float(ymax - ymin)

axparam = ImageAxesParam()
axparam.xmin = xmin
axparam.ymin = ymin
axparam.xmax = xmax
axparam.ymax = ymax

imgItem.set_item_parameters({"ImageParam":iparam})
imgItem.set_item_parameters({"ImageAxesParam":axparam})

hope it helps,
-Russ

From: ***@googlegroups.com [mailto:***@googlegroups.com] On Behalf Of Gilles Bordas
Sent: December-11-14 10:36 AM
To: ***@googlegroups.com
Subject: [guidata/guiqwt] guiqwt progammable zoom

Hello
With guiqwt I display CCD camera images.
I would like to know if it is possible to program the guiqwt zoom tool for displaying 1 pixel on my screen equal to 1 pixel of my camera's ccd sensor ?
In fact I mean 1 pixel in my guiqwt plot area correspond to 1 point (x,y,z) of my data array.

Regards
Gilles
--
You received this message because you are subscribed to the Google Groups "guidata/guiqwt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to guidata_guiqwt+***@googlegroups.com<mailto:guidata_guiqwt+***@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "guidata/guiqwt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to guidata_guiqwt+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Gilles Bordas
2014-12-15 14:24:43 UTC
Permalink
Hi Russ.
Thanks a lot for your proposals. It opened me new way of investigation.

I have tested your code example and I obtain the result below :
Picture 1 (Fig1) : initial image
Picture 2 (Fig 2) : After changing Image parameters according to your
example (I have put : iparamxmax=500, iparamymax=500)
Picture 3 (Fig3) : what i would like to programm. For the moment I obtain
it manually by zooming with the mouse (right click).

Regards
Gilles

<Loading Image...>
--
You received this message because you are subscribed to the Google Groups "guidata/guiqwt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to guidata_guiqwt+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...