Module gtkindiclient :: Class _ccdpreview
[show private | hide private]
[frames | no frames]

Class _ccdpreview

_blocking_indi_object_handler --+        
                                |        
          gui_indi_object_handler --+    
                                    |    
           indi_vector_identifier --+    
                                    |    
           indi_custom_vector_handler --+
                                        |
                                       _ccdpreview


A bandwidth optimised online display for CCDs.

A special python library must be installed in order to use this feature.
Method Summary
  __init__(self, devicename, drawingareawidget, brightnesswidget, contrastwidget, gammawidget)
BooleanType _area_expose_cb(self, area, event)
A callback method called by GTK in order to ask the image to redraw itself
FloatType _get_normed_value(self, widget)
Return the value of the GTK.Range object, scaled to be in the range from 0 to 1
  _scrollbar_changed(self, widget)
NoneType blob_received(self, blob)
called when an indiblob with format .ccdpreview has been received from the server.
NoneType disable(self)
Disables data reception
NoneType on_indiobject_changed(self, vector)
called when the INumberVector containing the parameters of the preview has been received for the server
NoneType reset(self)
Clear all buffers, and enable ccdpreview
NoneType update(self)
Update brightness contrast gamma, given by the GTK.Range widgets and queue the image for redrawing
    Inherited from indi_custom_vector_handler
NoneType configure(self, vector)
This hander method will be called only once.
indivector get_vector(self)
Returns the indivector this handler is associated with.
    Inherited from gui_indi_object_handler
NoneType on_blocked(self, *args)
The method _blocking_on_gui_changed is called by the GUI, in order to inform us, that a widget has changed.
NoneType on_gui_changed(self, *args)
Important: Implement your GUI callback here but link you GUI callback signal to {_blocking_on_gui_changed} (see on_blocked if you want to know why)
NoneType set_bidirectional(self)
installs callbacks of the GUI that will call the function _blocking_on_gui_changed if the user changes the the GUI object associated with this gui_indi_object_handler .
NoneType unset_bidirectional(self)
uninstalls the GUI callback installed with set_bidirectional (see set_bidirectional for details)
NoneType _blocking_on_gui_changed(self, *args)
Called by the GUI whenever the widget associated with this handler has changed.
    Inherited from _blocking_indi_object_handler
NoneType _block(self)
activates the block.
BooleanType _is_blocked(self)
Return True if blocked , False otherwise
NoneType _unblock(self)
releases the block.
NoneType indi_object_change_notify(self, *args)
This method activates the block, calls the method on_indiobject_changed (It is called by bigindiclient.process_events each time an INDI object has been received)

Instance Variable Summary
Gtk.DrawingArea area: A GTK Drawingarea widget
GTK.Range brightnesswidget: A GTK Range to adjust the brightness
IntType byteorder: The Byteorder
IntType bytesperpixel: The number of Bytes per pixel
GTK.Range contrastwidget: A GTK Range to adjust the contrast
BooleanType enabled: The preview will not be updated if set to False
GTK.Range gammawidget: A GTK Range to adjust gamma
array greybuf: a buffer containing the current image in up to 32 bit greyscale
IntType greypos: The writing position within greybuf
IntType maxgooddata: The maximum value which is still an accepted measurement within the limits of the CCD chip
array pbuf: a RGB buffer containing the current image
IntType previewheight: The height of the preview
IntType previewwidth: The width of the preview
    Inherited from indi_custom_vector_handler
StringType devicename: The name of the device this handler is associated with
indiclient indi: The indiclient instance calling this handler (will be set by indiclient automatically)
StringType type: The type of the handler
StringType vectorname: The name of the indivector this handler is associated with
    Inherited from _blocking_indi_object_handler
IntType _blocked: A counter incremented each time the _block method is called and decremented by _unblock, >0 means blocked, ==0 mean unblocked

Method Details

__init__(self, devicename, drawingareawidget, brightnesswidget, contrastwidget, gammawidget)
(Constructor)

Parameters:
devicename - The name of the device
           (type=StringType)
drawingareawidget - A GTK Drawingarea widget
           (type=Gtk.DrawingArea)
brightnesswidget - A GTK Range to adjust the brightness
           (type=GTK.Range)
contrastwidget - A GTK Range to adjust the contrast
           (type=GTK.Range)
gammawidget - A GTK Range to adjust gamma
           (type=GTK.Range)
Overrides:
indiclient.indi_custom_vector_handler.__init__

_area_expose_cb(self, area, event)

A callback method called by GTK in order to ask the image to redraw itself
Parameters:
area - The GTK.DrawingArea to be redrawn.
           (type=GTK.DrawingArea)
event - A GTK.Event (not used, but required by GTK).
           (type=GTK.Event)
Returns:
True
           (type=BooleanType)

_get_normed_value(self, widget)

Parameters:
widget - A GTK.Range object (like a scrollbar or a slider)
           (type=GTK.Range (or inherited))
Returns:
The value of the GTK.Range object, scaled to be in the range from 0 to 1
           (type=FloatType)

blob_received(self, blob)

called when an indiblob with format .ccdpreview has been received from the server.

It appends the data to the buffer and queues the image for redrawing
Parameters:
blob - the indiblob containing the data for the preview.
           (type=indiblob)
Returns:
None
           (type=NoneType)

disable(self)

Disables data reception
Returns:
None
           (type=NoneType)

on_indiobject_changed(self, vector)

called when the INumberVector containing the parameters of the preview has been received for the server
Parameters:
vector - INumberVector containing the parameters of the preview.
           (type=indivector)
Returns:
None
           (type=NoneType)
Overrides:
indiclient.indi_custom_vector_handler.on_indiobject_changed

reset(self)

Clear all buffers, and enable ccdpreview
Returns:
None
           (type=NoneType)

update(self)

Update brightness contrast gamma, given by the GTK.Range widgets and queue the image for redrawing
Returns:
None
           (type=NoneType)

Instance Variable Details

area

A GTK Drawingarea widget
Type:
Gtk.DrawingArea

brightnesswidget

A GTK Range to adjust the brightness
Type:
GTK.Range

byteorder

The Byteorder
Type:
IntType

bytesperpixel

The number of Bytes per pixel
Type:
IntType

contrastwidget

A GTK Range to adjust the contrast
Type:
GTK.Range

enabled

The preview will not be updated if set to False
Type:
BooleanType

gammawidget

A GTK Range to adjust gamma
Type:
GTK.Range

greybuf

a buffer containing the current image in up to 32 bit greyscale
Type:
array

greypos

The writing position within greybuf
Type:
IntType

maxgooddata

The maximum value which is still an accepted measurement within the limits of the CCD chip
Type:
IntType

pbuf

a RGB buffer containing the current image
Type:
array

previewheight

The height of the preview
Type:
IntType

previewwidth

The width of the preview
Type:
IntType

Generated by Epydoc 2.1 on Sat Sep 10 10:26:06 2005 http://epydoc.sf.net