#include <CylinderMarkerOrthoViewRenderer.hh>
|
| CylinderMarkerOrthoViewRenderer (CylinderMarker *marker, OrthoViewWidget *view) |
|
| CylinderMarkerOrthoViewRenderer (CylinderMarkerOrthoViewRenderer const &renderer) |
|
virtual | ~CylinderMarkerOrthoViewRenderer () |
|
bool | cacheUpdatesEnabled () const |
| Check whether cache updates are enabled. More...
|
|
virtual MarkerRenderer * | clone () const |
|
bool | isDragging () const |
|
Marker * | marker () const |
|
virtual void | render (QPainter *painter=NULL) const |
| Main rendering routine which is called whenever a paintEvent() on the Marker occurs. More...
|
|
virtual void | render (QXmlStreamWriter &svgStream, blitz::TinyVector< double, 3 > const &shapePx, blitz::TinyVector< double, 3 > const &lowerBoundUm, blitz::TinyVector< double, 3 > const &upperBoundUm, std::string const &font, double fontSizePt, iRoCS::ProgressReporter *pr=NULL) const |
| Render this marker into the given SVG-stream. More...
|
|
void | setDragging (bool drag) |
|
void | setOrthogonalDimension (int orthogonalDimension) |
| Before calling render set the dimension to render using this method. More...
|
|
virtual void | userInteractionEvent (UserInteractionEvent *event) |
|
ViewWidget * | view () const |
|
|
std::string | _getColorString (bool &draw) const |
| Get the RGB color string from the Settings in the PresetWidget. More...
|
|
bool | _setPenColor (QPainter *painter, bool hilighted=false) const |
| Set the pen according to the PresetWidget. More...
|
|
◆ CylinderMarkerOrthoViewRenderer() [1/2]
◆ CylinderMarkerOrthoViewRenderer() [2/2]
◆ ~CylinderMarkerOrthoViewRenderer()
virtual CylinderMarkerOrthoViewRenderer::~CylinderMarkerOrthoViewRenderer |
( |
| ) |
|
|
virtual |
◆ clone()
virtual MarkerRenderer* CylinderMarkerOrthoViewRenderer::clone |
( |
| ) |
const |
|
virtual |
◆ render() [1/2]
virtual void CylinderMarkerOrthoViewRenderer::render |
( |
QPainter * |
painter = NULL | ) |
const |
|
virtual |
Main rendering routine which is called whenever a paintEvent() on the Marker occurs.
Within this function the actual rendering of the associated Marker into the associated view is performed. The orthoview plane the painter is associated to has to be set prior to the call to the render() method using setOrthogonalDimension().
Within this method the passed QPainter may be used but painting may be also done by other means as e.g. by directly imposing OpenGL commands. The default implementation renders the current marker cache for the selected orthoview plane.
- Parameters
-
painter | The active QPainter or NULL if no painter is currently active or the view update is not QPainter-based, like e.g. for OpenGL rendering |
Reimplemented from MarkerOrthoViewRenderer.
◆ render() [2/2]
virtual void CylinderMarkerOrthoViewRenderer::render |
( |
QXmlStreamWriter & |
svgStream, |
|
|
blitz::TinyVector< double, 3 > const & |
shapePx, |
|
|
blitz::TinyVector< double, 3 > const & |
lowerBoundUm, |
|
|
blitz::TinyVector< double, 3 > const & |
upperBoundUm, |
|
|
std::string const & |
font, |
|
|
double |
fontSizePt, |
|
|
iRoCS::ProgressReporter * |
pr = NULL |
|
) |
| const |
|
virtual |
Render this marker into the given SVG-stream.
The default implementation does nothing. Overload this function if you want to be able to render the view of the given marker type as 2D vector graphics.
- Parameters
-
svgStream | The output stream to append this channel visualization to |
shapePx | The shape of the rectangular ROI to render in voxel coordinates. It is only given for convenience, since one could compute this information from the model's element size and the given bounds |
lowerBoundUm | The lower bounds of the rectangular ROI to render |
upperBoundUm | The upper bounds of the rectangular POI to render |
font | The font to use for textual annotations |
fontSizePt | The font size in pt |
pr | If given progress will be reported via that ProgressReporter |
Implements MarkerOrthoViewRenderer.
◆ userInteractionEvent()
◆ setOrthogonalDimension()
void MarkerOrthoViewRenderer::setOrthogonalDimension |
( |
int |
orthogonalDimension | ) |
|
|
inherited |
Before calling render set the dimension to render using this method.
- Parameters
-
orthogonalDimension | The orthogonal dimension to the orthoview plane to render |
◆ setFontSize
void MarkerOrthoViewRenderer::setFontSize |
( |
int |
fontSize | ) |
|
|
inlineslotinherited |
◆ updateCache [1/2]
virtual void MarkerOrthoViewRenderer::updateCache |
( |
| ) |
const |
|
virtualslotinherited |
Update the rendering cache for all orthoview planes.
This function is called by the associated ChannelSpecs if its content changes such that an cache update might be neccessary. The default implementation calls the updateCache(int) for every direction. You can disable the cache updates using the setCacheUpdatesEnabled() function. This is important if you programmatically perform many operations on the ChannelSpecs, of which each would need a cache update. After the sequence of operations, you have to call updateCache() explicitely to apply the changes. After cache update update() of the view is called to visualize the changes. So if many channels are involved you should call setUpdatesEnabled(false) to the view before these changes.
Usually this function need not be reimplemented. Reimplement the dimension-aware version updateCache(int) instead.
◆ updateCache [2/2]
virtual void MarkerOrthoViewRenderer::updateCache |
( |
int |
direction | ) |
const |
|
virtualslotinherited |
Update the rendering cache for the specified orthoview dimension.
This function is called by the updateCache()-Method for every direction. On crosshair position change the view widget explicitely calls this function with the dimensions orthogonal to the cross hair position change. Reimplement this function if you have expensive computations that should not be done at every repaint. The default implementation only calls the update() function of the view. You can disable the cacheUpdates using the setCacheUpdatesEnabled() function. This is important if you programmatically perform many operations on the Marker of which each would need a cache update. After the sequence of operations, you have to call updateCache() explicitely to apply the changes. After cache update update() of the view is called to visualize the changes. So if many markers/channels are involved you should call setUpdatesEnabled(false) to the view before these changes.
Reimplemented in CellMarkerOrthoViewRenderer.
◆ _setPenColor()
bool MarkerOrthoViewRenderer::_setPenColor |
( |
QPainter * |
painter, |
|
|
bool |
hilighted = false |
|
) |
| const |
|
protectedinherited |
Set the pen according to the PresetWidget.
- Parameters
-
painter | The painter to set the pen for |
hilighted | If the marker is selected set this bool to true |
- Returns
- true if the marker is visible, false if not
◆ _getColorString()
std::string MarkerOrthoViewRenderer::_getColorString |
( |
bool & |
draw | ) |
const |
|
protectedinherited |
Get the RGB color string from the Settings in the PresetWidget.
It is of the form "\#RRGGBB".
- Parameters
-
draw | This bool is false if the marker has an alpha value of zero and is therefore not visible |
- Returns
- The marker color as RGB color string
◆ marker()
Marker* MarkerRenderer::marker |
( |
| ) |
const |
|
inherited |
◆ view()
◆ isDragging()
bool MarkerRenderer::isDragging |
( |
| ) |
const |
|
inherited |
◆ setDragging()
void MarkerRenderer::setDragging |
( |
bool |
drag | ) |
|
|
inherited |
◆ cacheUpdatesEnabled()
bool MarkerRenderer::cacheUpdatesEnabled |
( |
| ) |
const |
|
inherited |
◆ setCacheUpdatesEnabled
void MarkerRenderer::setCacheUpdatesEnabled |
( |
bool |
enable | ) |
|
|
slotinherited |
Enables or disables the updates of the rendering cache.
This usually means that changes in the Marker or the View position don't lead to an update of the view. This is useful, if you have to programmatically perform many small operations on the marker of which not each should trigger a repaint.
- Parameters
-
enable | true to enable, false to disable cache updates |
◆ _orthogonalDimension
int MarkerOrthoViewRenderer::_orthogonalDimension |
|
protectedinherited |
◆ _cache
|
mutableprotectedinherited |
◆ p_marker
Marker* MarkerRenderer::p_marker |
|
protectedinherited |
◆ p_view
◆ _dragging
bool MarkerRenderer::_dragging |
|
protectedinherited |
The documentation for this class was generated from the following file: