iRoCS Toolbox  1.1.0
Public Types | Public Slots | Signals | Public Member Functions | Protected Attributes | Friends
OrthoViewWidget Class Reference

#include <OrthoViewWidget.hh>

Inheritance diagram for OrthoViewWidget:
Collaboration diagram for OrthoViewWidget:

Public Types

enum  ViewType { OrthoView, OpenGlRenderingView }
 

Public Slots

virtual void redraw ()
 
void setInterpolation (bool interpolation)
 
virtual void setPositionUm (const blitz::TinyVector< double, 3 > &positionUm)
 
virtual void setShowHelperLines (bool show)
 
virtual void setSnapToVoxelGrid (bool snap)
 
void setZoom (double zoom)
 
void updatePlaneData (ChannelSpecsOrthoViewRenderer const *renderer, int direction)
 
void updateShape ()
 

Signals

void positionChanged (const blitz::TinyVector< double, 3 > &positionUm)
 
void zoomChanged (double zoom)
 

Public Member Functions

 OrthoViewWidget (MultiChannelModel *model, QWidget *parent=0, Qt::WindowFlags f=0)
 
 ~OrthoViewWidget ()
 
void addChannel (ChannelSpecs *channel)
 
int fontSize () const
 
bool interpolation () const
 
MultiChannelModelmodel () const
 
OrthoViewPlaneorthoViewPlane (int orthogonalDimension)
 
void paint (QPainter &painter)
 
void paint (QXmlStreamWriter &svgStream, blitz::TinyVector< double, 3 > const &shapePx, double marginPx, blitz::TinyVector< double, 3 > const &lowerBoundUm, blitz::TinyVector< double, 3 > const &upperBoundUm, double scaleBarLengthUm, std::string const &font, double fontSizePt, iRoCS::ProgressReporter *pr=NULL)
 
blitz::TinyVector< double, 3 > positionUm () const
 
blitz::TinyVector< float, 3 > px2Um (blitz::TinyVector< float, 3 > const &positionPx)
 Get the model micrometer position of the given pixel position. More...
 
double px2Um (double positionPx, int dimension)
 Get the model micrometer position of the given pixel position along the specified dimension. More...
 
void removeChannel (ChannelSpecs *channel)
 
double scaleToPx (double distanceUm)
 Get the pixel distance in the view for the given micrometer distance. More...
 
double scaleToUm (double distancePx)
 Get the micrometer distance for the given pixel distance in the view. More...
 
bool showHelperLines () const
 
bool snapToVoxelGrid () const
 
blitz::TinyVector< float, 3 > um2Px (blitz::TinyVector< float, 3 > const &positionUm)
 Get the pixel position of the given model position in micrometers in the view widget. More...
 
double um2Px (double positionUm, int dimension)
 Get the pixel position of the given model position in micrometers in the view widget for the specified dimension. More...
 
ViewWidget::ViewType viewType () const
 
OrthoViewPlanexyView ()
 
OrthoViewPlanexzView ()
 
double zoom () const
 
OrthoViewPlanezyView ()
 

Protected Attributes

MultiChannelModelp_model
 

Friends

class OrthoViewPlane
 

Detailed Description

Definition at line 50 of file OrthoViewWidget.hh.

Member Enumeration Documentation

◆ ViewType

enum ViewWidget::ViewType
inherited
Enumerator
OrthoView 
OpenGlRenderingView 

Definition at line 48 of file ViewWidget.hh.

Constructor & Destructor Documentation

◆ OrthoViewWidget()

OrthoViewWidget::OrthoViewWidget ( MultiChannelModel model,
QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)

◆ ~OrthoViewWidget()

OrthoViewWidget::~OrthoViewWidget ( )

Member Function Documentation

◆ viewType()

ViewWidget::ViewType OrthoViewWidget::viewType ( ) const
virtual

Implements ViewWidget.

◆ addChannel()

void OrthoViewWidget::addChannel ( ChannelSpecs channel)
virtual

Implements ViewWidget.

◆ removeChannel()

void OrthoViewWidget::removeChannel ( ChannelSpecs channel)
virtual

Implements ViewWidget.

◆ xyView()

OrthoViewPlane* OrthoViewWidget::xyView ( )

◆ xzView()

OrthoViewPlane* OrthoViewWidget::xzView ( )

◆ zyView()

OrthoViewPlane* OrthoViewWidget::zyView ( )

◆ orthoViewPlane()

OrthoViewPlane* OrthoViewWidget::orthoViewPlane ( int  orthogonalDimension)

◆ interpolation()

bool OrthoViewWidget::interpolation ( ) const

◆ zoom()

double OrthoViewWidget::zoom ( ) const

◆ fontSize()

int OrthoViewWidget::fontSize ( ) const

◆ um2Px() [1/2]

blitz::TinyVector<float,3> OrthoViewWidget::um2Px ( blitz::TinyVector< float, 3 > const &  positionUm)

Get the pixel position of the given model position in micrometers in the view widget.

This transformation respects the model bounding box and the currently set zoom of the view.

Parameters
positionUmThe micrometer position to locate in the view widget
Returns
The corresponding pixel position in the view widget.

◆ scaleToPx()

double OrthoViewWidget::scaleToPx ( double  distanceUm)

Get the pixel distance in the view for the given micrometer distance.

Parameters
distanceUmThe micrometer distance
Returns
The same distance in pixels.

◆ um2Px() [2/2]

double OrthoViewWidget::um2Px ( double  positionUm,
int  dimension 
)

Get the pixel position of the given model position in micrometers in the view widget for the specified dimension.

This transformation respects the model bounding box and the currently set zoom of the view.

Parameters
positionUmThe micrometer position to locate in the view widget
dimensionThe vector component of the position to evaluate
Returns
The corresponding pixel position along the given dimension in the view widget.

◆ px2Um() [1/2]

blitz::TinyVector<float,3> OrthoViewWidget::px2Um ( blitz::TinyVector< float, 3 > const &  positionPx)

Get the model micrometer position of the given pixel position.

This transformation respects the model bounding box and the currently set zoom of the view.

Parameters
positionPxThe pixel position in the view
Returns
The corresponding micrometer position in the model.

◆ scaleToUm()

double OrthoViewWidget::scaleToUm ( double  distancePx)

Get the micrometer distance for the given pixel distance in the view.

Parameters
distancePxThe pixel distance
Returns
The same distance in micrometers.

◆ px2Um() [2/2]

double OrthoViewWidget::px2Um ( double  positionPx,
int  dimension 
)

Get the model micrometer position of the given pixel position along the specified dimension.

This transformation respects the model bounding box and the currently set zoom of the view.

Parameters
positionPxThe pixel position in the view
dimensionThe vector component of the position to evaluate
Returns
The corresponding micrometer position in the model.

◆ paint() [1/2]

void OrthoViewWidget::paint ( QPainter &  painter)

◆ paint() [2/2]

void OrthoViewWidget::paint ( QXmlStreamWriter &  svgStream,
blitz::TinyVector< double, 3 > const &  shapePx,
double  marginPx,
blitz::TinyVector< double, 3 > const &  lowerBoundUm,
blitz::TinyVector< double, 3 > const &  upperBoundUm,
double  scaleBarLengthUm,
std::string const &  font,
double  fontSizePt,
iRoCS::ProgressReporter pr = NULL 
)

◆ zoomChanged

void OrthoViewWidget::zoomChanged ( double  zoom)
signal

◆ redraw

virtual void OrthoViewWidget::redraw ( )
virtualslot

◆ updateShape

void OrthoViewWidget::updateShape ( )
slot

◆ setInterpolation

void OrthoViewWidget::setInterpolation ( bool  interpolation)
slot

◆ setZoom

void OrthoViewWidget::setZoom ( double  zoom)
slot

◆ updatePlaneData

void OrthoViewWidget::updatePlaneData ( ChannelSpecsOrthoViewRenderer const *  renderer,
int  direction 
)
slot

◆ snapToVoxelGrid()

bool ViewWidget::snapToVoxelGrid ( ) const
inherited

◆ showHelperLines()

bool ViewWidget::showHelperLines ( ) const
inherited

◆ positionUm()

blitz::TinyVector<double,3> ViewWidget::positionUm ( ) const
inherited

◆ model()

MultiChannelModel* ViewWidget::model ( ) const
inherited

◆ positionChanged

void ViewWidget::positionChanged ( const blitz::TinyVector< double, 3 > &  positionUm)
signalinherited

◆ setSnapToVoxelGrid

virtual void ViewWidget::setSnapToVoxelGrid ( bool  snap)
virtualslotinherited

◆ setShowHelperLines

virtual void ViewWidget::setShowHelperLines ( bool  show)
virtualslotinherited

◆ setPositionUm

virtual void ViewWidget::setPositionUm ( const blitz::TinyVector< double, 3 > &  positionUm)
virtualslotinherited

Friends And Related Function Documentation

◆ OrthoViewPlane

friend class OrthoViewPlane
friend

Definition at line 215 of file OrthoViewWidget.hh.

Field Documentation

◆ p_model

MultiChannelModel* ViewWidget::p_model
protectedinherited

Definition at line 85 of file ViewWidget.hh.


The documentation for this class was generated from the following file: