class DSubFrame displays an image within a DMainFrame
More...
class DSubFrame displays an image within a DMainFrame
| def dectris.albula.DSubFrame.__init__ |
( |
|
self, |
|
|
|
viewerClient, |
|
|
|
objID, |
|
|
|
mainFrame |
|
) |
| |
| def dectris.albula.DSubFrame.addToPaintList |
( |
|
self, |
|
|
|
paintList |
|
) |
| |
Add drawing primitives to paint list.
- Parameters
-
| def dectris.albula.DSubFrame.clearPaintList |
( |
|
self | ) |
|
| 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
-
| imageNumber | Integer number of the image within its series |
| def dectris.albula.DSubFrame.hideResolutionRings |
( |
|
self | ) |
|
| 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
-
| pixelArray | list of pairs of two integers (e.g. [[x0,y0],[x1,y1],...] |
| red | int between 0 and 255 |
| green | int between 0 and 255 |
| blue | int between 0 and 255 |
| alpha | int between 0 and 255. Opacity. |
| def dectris.albula.DSubFrame.loadFile |
( |
|
self, |
|
|
|
pathToImage |
|
) |
| |
Load image from file.
- Parameters
-
| pathToImage | Full path to the image file |
| def dectris.albula.DSubFrame.loadImage |
( |
|
self, |
|
|
|
image, |
|
|
|
contrast = None |
|
) |
| |
Display DImage.
- Parameters
-
| image | DImage object |
| contrast | Callable 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 | ) |
|
| def dectris.albula.DSubFrame.setActiveColor |
( |
|
self, |
|
|
|
red, |
|
|
|
green, |
|
|
|
blue |
|
) |
| |
Set title bar color of active DSubFrame in RGB space.
See setNonActiveColor
- Parameters
-
| red | integer between 0 and 255 |
| green | integer between 0 and 255 |
| blue | integer 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
-
| background | Integer or float value depending on the type of the currently loaded image |
| def dectris.albula.DSubFrame.setColorMode |
( |
|
self, |
|
|
|
colormode |
|
) |
| |
Set color mode:
- Parameters
-
| colormode | One 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
-
| foreground | Integer or float value depending on the type of the currently loaded image |
| background | Integer 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
-
| foreground | Integer 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
-
| red | integer between 0 and 255 |
| green | integer between 0 and 255 |
| blue | integer between 0 and 255 |
| def dectris.albula.DSubFrame.setOffsetX |
( |
|
self, |
|
|
|
offsetX |
|
) |
| |
| def dectris.albula.DSubFrame.setOffsetY |
( |
|
self, |
|
|
|
offsetY |
|
) |
| |
| def dectris.albula.DSubFrame.setPaintList |
( |
|
self, |
|
|
|
paintList |
|
) |
| |
Set paint list, which is the list of drawing primitives (DDrawingPrimitive) to be painted.
- Parameters
-
| 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
-
| title | String 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
-
| offsetX | Integer value between 0 and width of currently loaded image |
| offsetY | Integer value between 0 and height of currently loaded image |
| zoomPower | Integer value between -2 and 6. The image is zoomed by a factor of . |
| def dectris.albula.DSubFrame.setZoomPower |
( |
|
self, |
|
|
|
zoomPower |
|
) |
| |
| def dectris.albula.DSubFrame.showResolutionRings |
( |
|
self | ) |
|
| 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.