ALBULA  4.0.1
 All Classes Namespaces Functions Variables Pages
dectris.albula.DSubFrame Class Reference

class DSubFrame displays an image within a DMainFrame More...

Inheritance diagram for dectris.albula.DSubFrame:
dectris.albula.DFrame

Public Member Functions

def __init__
 
def mainFrame
 DMainFrame the object is attached to Returns a valid DMainFrame even after it has been closed. More...
 
def hideToolButtons
 Hide tool buttons in the title bar. More...
 
def showToolButtons
 Show tool buttons in the title bar. More...
 
def setActiveColor
 Set title bar color of active DSubFrame in RGB space. More...
 
def setNonActiveColor
 Set title bar color of non-active DSubFrame in RGB space. More...
 
def loadFile
 Load image from file. More...
 
def loadImage
 Display DImage. More...
 
def highlightPixels
 Highlight the pixels passed by pixelArray with crosses of the given color. More...
 
def addToPaintList
 Add drawing primitives to paint list. More...
 
def setPaintList
 Set paint list, which is the list of drawing primitives (DDrawingPrimitive) to be painted. More...
 
def clearPaintList
 Clear the paint list. More...
 
def goTo
 If an currently loaded image belongs to a series open image of the current series by passing its number. More...
 
def setOffsetX
 Move image in X direction. More...
 
def setOffsetY
 Move image in Y direction. More...
 
def setZoomPower
 Zoom the image. More...
 
def setViewport
 Set the view port i.e. More...
 
def setForeground
 Set the foreground value of the image. More...
 
def setBackground
 Set the background value of the image. More...
 
def setContrast
 Set the foreground and background values of the image, which defines the contrast for an image. More...
 
def setTitle
 Set the title of the DSubFrame. More...
 
def unsetTitle
 Call after setTitle() in order to restore the default behaviour of the DSubFrame: The path to the currently loaded image will be displayed in the title bar. More...
 
def setColorMode
 Set color mode: More...
 
def showResolutionRings
 Show Resolution Rings. More...
 
def hideResolutionRings
 Hide Resolution Rings. More...
 
- Public Member Functions inherited from dectris.albula.DFrame
def __init__
 
def viewerClient
 
def objID
 
def close
 Closes the Frame. More...
 
def waitForClose
 Blocks until object is closed by user. More...
 
def sendCommand
 

Detailed Description

class DSubFrame displays an image within a DMainFrame

Constructor & Destructor Documentation

def dectris.albula.DSubFrame.__init__ (   self,
  viewerClient,
  objID,
  mainFrame 
)

Member Function Documentation

def dectris.albula.DSubFrame.addToPaintList (   self,
  paintList 
)

Add drawing primitives to paint list.

Parameters
paintListlist of elements of type DDrawingPrimitive
def dectris.albula.DSubFrame.clearPaintList (   self)

Clear the paint list.

See also addToPaintList(), highlightPixels().

def dectris.albula.DSubFrame.goTo (   self,
  imageNumber 
)

If an currently loaded image belongs to a series open image of the current series by passing its number.

Parameters
imageNumberInteger number of the image within its series
def dectris.albula.DSubFrame.hideResolutionRings (   self)

Hide Resolution Rings.

def dectris.albula.DSubFrame.hideToolButtons (   self)

Hide tool buttons in the title bar.

def dectris.albula.DSubFrame.highlightPixels (   self,
  pixelArray,
  red,
  green,
  blue,
  alpha = 255 
)

Highlight the pixels passed by pixelArray with crosses of the given color.

See also clearPaintList().

Parameters
pixelArraylist of pairs of two integers (e.g. [[x0,y0],[x1,y1],...]
redint between 0 and 255
greenint between 0 and 255
blueint between 0 and 255
alphaint between 0 and 255. Opacity.
def dectris.albula.DSubFrame.loadFile (   self,
  pathToImage 
)

Load image from file.

Parameters
pathToImageFull path to the image file
def dectris.albula.DSubFrame.loadImage (   self,
  image,
  contrast = None 
)

Display DImage.

Parameters
imageDImage object
contrastCallable object returning a tuple used to compute foreground and background. If not None foreground (background) is set to the first (second) return value of contrast(image,image.optionalData().pixel_mask()). See DContrast for a reference implementation.
def dectris.albula.DSubFrame.mainFrame (   self)

DMainFrame the object is attached to Returns a valid DMainFrame even after it has been closed.

Returns
DMainFrame
def dectris.albula.DSubFrame.setActiveColor (   self,
  red,
  green,
  blue 
)

Set title bar color of active DSubFrame in RGB space.

See setNonActiveColor

Parameters
redinteger between 0 and 255
greeninteger between 0 and 255
blueinteger between 0 and 255
def dectris.albula.DSubFrame.setBackground (   self,
  background 
)

Set the background value of the image.

Pixels with intensities within the background region (foreground region) are drawn in the background color (foreground color). In between the pixel values are linearly mapped to a color scale specified by the color mode settings. See also setForeground and setContrast().

Parameters
backgroundInteger or float value depending on the type of the currently loaded image
def dectris.albula.DSubFrame.setColorMode (   self,
  colormode 
)

Set color mode:

Parameters
colormodeOne of the strings below
  • "High Dynamic Range" or "HDR"
  • "Grey Scale" or "GS"
  • "Heat" or "H"
  • "Rainbow" or "RB"
def dectris.albula.DSubFrame.setContrast (   self,
  foreground,
  background 
)

Set the foreground and background values of the image, which defines the contrast for an image.

Pixels with intensities within the background region (foreground region) are drawn in the background color (foreground color). In between the pixel values are linearly mapped to a color scale specified by the color mode settings. See also setForeground() and setBackground().

Parameters
foregroundInteger or float value depending on the type of the currently loaded image
backgroundInteger or float value depending on the type of the currently loaded image
def dectris.albula.DSubFrame.setForeground (   self,
  foreground 
)

Set the foreground value of the image.

Pixels with intensities within the background region (foreground region) are drawn in the background color (foreground color). In between the pixel values are linearly mapped to a color scale specified by the color mode settings. See also setBackground and setContrast().

Parameters
foregroundInteger or float value depending on the type of the currently loaded image
def dectris.albula.DSubFrame.setNonActiveColor (   self,
  red,
  green,
  blue 
)

Set title bar color of non-active DSubFrame in RGB space.

See setActiveColor()

Parameters
redinteger between 0 and 255
greeninteger between 0 and 255
blueinteger between 0 and 255
def dectris.albula.DSubFrame.setOffsetX (   self,
  offsetX 
)

Move image in X direction.

See also setOffsetY(), setZoomPower() and setViewport().

Parameters
offsetXInteger value between 0 and width of currently loaded image
def dectris.albula.DSubFrame.setOffsetY (   self,
  offsetY 
)

Move image in Y direction.

See also setOffsetX(), setZoomPower() and setViewport().

Parameters
offsetYInteger value between 0 and height of currently loaded image
def dectris.albula.DSubFrame.setPaintList (   self,
  paintList 
)

Set paint list, which is the list of drawing primitives (DDrawingPrimitive) to be painted.

Parameters
paintListlist of elements of type DDrawingPrimitive
def dectris.albula.DSubFrame.setTitle (   self,
  title 
)

Set the title of the DSubFrame.

If set the DSubFrame does no longer show the file path to the loaded image. Restore the default behaviour by calling unsetTitle().

Parameters
titleString that will be displayed in the title bar
def dectris.albula.DSubFrame.setViewport (   self,
  offsetX,
  offsetY,
  zoomPower 
)

Set the view port i.e.

the section of image that is displayed.

Parameters
offsetXInteger value between 0 and width of currently loaded image
offsetYInteger value between 0 and height of currently loaded image
zoomPowerInteger value between -2 and 6. The image is zoomed by a factor of $ 2^\text{zoomPower}$.
def dectris.albula.DSubFrame.setZoomPower (   self,
  zoomPower 
)

Zoom the image.

See also setOffsetX(), setOffsetY() and setViewport().

Parameters
zoomPowerInteger value between -2 and 6. The image is zoomed by a factor of $ 2^\text{zoomPower}$.
def dectris.albula.DSubFrame.showResolutionRings (   self)

Show Resolution Rings.

def dectris.albula.DSubFrame.showToolButtons (   self)

Show tool buttons in the title bar.

def dectris.albula.DSubFrame.unsetTitle (   self)

Call after setTitle() in order to restore the default behaviour of the DSubFrame: The path to the currently loaded image will be displayed in the title bar.