iRoCS Toolbox  1.1.0
Public Types | Public Slots | Signals | Public Member Functions | Static Public Attributes | Protected Slots | Protected Attributes
ChannelSpecs Class Referenceabstract

#include <ChannelSpecs.hh>

Inheritance diagram for ChannelSpecs:
Collaboration diagram for ChannelSpecs:

Public Types

enum  ChannelType {
  Data = 0x0001, Visualization = 0x0002, RGB = 0x0004, Annotation = 0x0008,
  SplineCurve = 0x0010, IRoCS = 0x0020, IRoCSSCT = 0x0040
}
 

Public Slots

virtual void revalidate ()
 Reset the channel shape, element size, transformation and bounding box from the underlying data. More...
 
void setAlpha (float alpha)
 
void setHasNewData (bool hasNewData)
 
void setIcon (QIcon const &icon)
 
void setName (std::string const &name)
 
virtual void setTransformation (blitz::TinyMatrix< double, 4, 4 > const &transformation)
 
void setUpdatesEnabled (bool enable)
 Enables/Disables cache updates for this channel. More...
 
void setVisible (bool visible)
 
void update ()
 Explicitely trigger a cache update for all associated renderers. More...
 

Signals

void boundingBoxChanged (blitz::TinyVector< double, 3 > const &lowerBoundUm, blitz::TinyVector< double, 3 > const &upperBoundUm)
 
void iconChanged ()
 
void nameChanged ()
 
void transformationChanged ()
 
void viewChanged ()
 This signal is emitted whenever the contents or visualization of the channel are altered and an update of the views is required to reflect these changes. More...
 

Public Member Functions

 ChannelSpecs (MultiChannelModel *model=NULL)
 
virtual ~ChannelSpecs ()
 
virtual ChannelSpecsRendereraddRenderer (ViewWidget *view)=0
 
float alpha () const
 
QWidget * channelControlWidget () const
 
virtual ChannelType channelType () const =0
 
virtual blitz::TinyVector< double, 3 > const & elementSizeUm () const
 
bool hasNewData () const
 
QIcon icon () const
 
virtual blitz::TinyVector< double, 3 > const & lowerBoundUm () const
 
MultiChannelModelmodel () const
 
std::string name () const
 
void removeRenderer (ViewWidget *view)
 
ChannelSpecsRendererrenderer (ViewWidget *view) const
 
std::map< ViewWidget *, ChannelSpecsRenderer * > const & renderers () const
 
std::map< ViewWidget *, ChannelSpecsRenderer * > & renderers ()
 
void setModel (MultiChannelModel *model)
 
virtual std::string stringValueAt (blitz::TinyVector< double, 3 > const &positionUm) const =0
 
virtual blitz::TinyMatrix< double, 4, 4 > const & transformation () const
 
bool updatesEnabled () const
 Check whether cache updates for this channel are enabled. More...
 
virtual blitz::TinyVector< double, 3 > const & upperBoundUm () const
 
virtual float valueAt (blitz::TinyVector< double, 3 > const &positionUm) const =0
 
bool visible () const
 

Static Public Attributes

static ChannelTypes const Any
 

Protected Slots

void emitUpdateRequest ()
 This function sets the hasNewData flag for this channel to true, to inform the renderers that this channel has new data and possibly cached values are invalid. More...
 

Protected Attributes

blitz::TinyVector< double, 3 > _elementSizeUm
 
bool _hasNewData
 
blitz::TinyVector< double, 3 > _lowerBoundUm
 
bool _oldVisibilityState
 
blitz::TinyMatrix< double, 4, 4 > _originalTransformation
 
std::map< ViewWidget *, ChannelSpecsRenderer * > _renderers
 
blitz::TinyMatrix< double, 4, 4 > _transformation
 
blitz::TinyVector< double, 3 > _upperBoundUm
 
QFormLayout * p_advancedControlLayout
 
QWidget * p_advancedControlWidget
 
DoubleControlElementp_alphaControl
 
QFormLayout * p_channelControlLayout
 
QWidget * p_channelControlWidget
 
MultiChannelModelp_model
 
QToolButton * p_toggleAdvancedButton
 
Double4x4ControlElementp_transformationControl
 
BoolControlElementp_visibleControl
 

Detailed Description

Definition at line 53 of file ChannelSpecs.hh.

Member Enumeration Documentation

◆ ChannelType

Enumerator
Data 
Visualization 
RGB 
Annotation 
SplineCurve 
IRoCS 
IRoCSSCT 

Definition at line 60 of file ChannelSpecs.hh.

Constructor & Destructor Documentation

◆ ChannelSpecs()

ChannelSpecs::ChannelSpecs ( MultiChannelModel model = NULL)

◆ ~ChannelSpecs()

virtual ChannelSpecs::~ChannelSpecs ( )
virtual

Member Function Documentation

◆ channelType()

virtual ChannelType ChannelSpecs::channelType ( ) const
pure virtual

◆ setModel()

void ChannelSpecs::setModel ( MultiChannelModel model)

◆ model()

MultiChannelModel* ChannelSpecs::model ( ) const

◆ name()

std::string ChannelSpecs::name ( ) const

◆ icon()

QIcon ChannelSpecs::icon ( ) const

◆ alpha()

float ChannelSpecs::alpha ( ) const

◆ visible()

bool ChannelSpecs::visible ( ) const

◆ hasNewData()

bool ChannelSpecs::hasNewData ( ) const

◆ lowerBoundUm()

virtual blitz::TinyVector<double,3> const& ChannelSpecs::lowerBoundUm ( ) const
virtual

◆ upperBoundUm()

virtual blitz::TinyVector<double,3> const& ChannelSpecs::upperBoundUm ( ) const
virtual

◆ elementSizeUm()

virtual blitz::TinyVector<double,3> const& ChannelSpecs::elementSizeUm ( ) const
virtual

◆ transformation()

virtual blitz::TinyMatrix<double,4,4> const& ChannelSpecs::transformation ( ) const
virtual

◆ channelControlWidget()

QWidget* ChannelSpecs::channelControlWidget ( ) const

◆ valueAt()

virtual float ChannelSpecs::valueAt ( blitz::TinyVector< double, 3 > const &  positionUm) const
pure virtual

◆ stringValueAt()

virtual std::string ChannelSpecs::stringValueAt ( blitz::TinyVector< double, 3 > const &  positionUm) const
pure virtual

◆ addRenderer()

virtual ChannelSpecsRenderer* ChannelSpecs::addRenderer ( ViewWidget view)
pure virtual

◆ removeRenderer()

void ChannelSpecs::removeRenderer ( ViewWidget view)

◆ renderer()

ChannelSpecsRenderer* ChannelSpecs::renderer ( ViewWidget view) const

◆ renderers() [1/2]

std::map<ViewWidget*,ChannelSpecsRenderer*> const& ChannelSpecs::renderers ( ) const

◆ renderers() [2/2]

std::map<ViewWidget*,ChannelSpecsRenderer*>& ChannelSpecs::renderers ( )

◆ updatesEnabled()

bool ChannelSpecs::updatesEnabled ( ) const

Check whether cache updates for this channel are enabled.

Returns
true if cache updates are enabled, false otherwise

◆ setName

void ChannelSpecs::setName ( std::string const &  name)
slot

◆ setIcon

void ChannelSpecs::setIcon ( QIcon const &  icon)
slot

◆ setAlpha

void ChannelSpecs::setAlpha ( float  alpha)
slot

◆ setVisible

void ChannelSpecs::setVisible ( bool  visible)
slot

◆ setHasNewData

void ChannelSpecs::setHasNewData ( bool  hasNewData)
slot

◆ setTransformation

virtual void ChannelSpecs::setTransformation ( blitz::TinyMatrix< double, 4, 4 > const &  transformation)
virtualslot

◆ setUpdatesEnabled

void ChannelSpecs::setUpdatesEnabled ( bool  enable)
slot

Enables/Disables cache updates for this channel.

If you programmatically apply many subsequent changes to a channel like automatic marker insertion or property changes, disable cache updates, otherwise each operation triggers a cache update.

Parameters
enabletrue to enable cache updates, false to disable cache updates

◆ update

void ChannelSpecs::update ( )
slot

Explicitely trigger a cache update for all associated renderers.

This is only necessary if updates were disabled and after all changes the cache has to be updated. If updates are disabled a call to this function is a noop.

◆ revalidate

virtual void ChannelSpecs::revalidate ( )
virtualslot

Reset the channel shape, element size, transformation and bounding box from the underlying data.

This method must be called whenever the underlying data were programmatically changed using the direct data access methods. If updates are enabled it will also do cache updates.

◆ boundingBoxChanged

void ChannelSpecs::boundingBoxChanged ( blitz::TinyVector< double, 3 > const &  lowerBoundUm,
blitz::TinyVector< double, 3 > const &  upperBoundUm 
)
signal

◆ iconChanged

void ChannelSpecs::iconChanged ( )
signal

◆ nameChanged

void ChannelSpecs::nameChanged ( )
signal

◆ transformationChanged

void ChannelSpecs::transformationChanged ( )
signal

◆ viewChanged

void ChannelSpecs::viewChanged ( )
signal

This signal is emitted whenever the contents or visualization of the channel are altered and an update of the views is required to reflect these changes.

The MultiChannelModel catches this SIGNAL, calls updateCache() and redraw() for all views and clears the hasNewData flag for all channels when the redraw has finished.

◆ emitUpdateRequest

void ChannelSpecs::emitUpdateRequest ( )
protectedslot

This function sets the hasNewData flag for this channel to true, to inform the renderers that this channel has new data and possibly cached values are invalid.

It also saves the current visibility state to _oldVisibilityState and emits a viewChanged() SIGNAL.

Field Documentation

◆ Any

ChannelTypes const ChannelSpecs::Any
static

Definition at line 70 of file ChannelSpecs.hh.

◆ p_model

MultiChannelModel* ChannelSpecs::p_model
protected

Definition at line 200 of file ChannelSpecs.hh.

◆ _renderers

std::map<ViewWidget*,ChannelSpecsRenderer*> ChannelSpecs::_renderers
protected

Definition at line 201 of file ChannelSpecs.hh.

◆ p_channelControlWidget

QWidget* ChannelSpecs::p_channelControlWidget
protected

Definition at line 202 of file ChannelSpecs.hh.

◆ p_channelControlLayout

QFormLayout* ChannelSpecs::p_channelControlLayout
protected

Definition at line 203 of file ChannelSpecs.hh.

◆ p_alphaControl

DoubleControlElement* ChannelSpecs::p_alphaControl
protected

Definition at line 204 of file ChannelSpecs.hh.

◆ p_visibleControl

BoolControlElement* ChannelSpecs::p_visibleControl
protected

Definition at line 205 of file ChannelSpecs.hh.

◆ p_toggleAdvancedButton

QToolButton* ChannelSpecs::p_toggleAdvancedButton
protected

Definition at line 207 of file ChannelSpecs.hh.

◆ p_advancedControlWidget

QWidget* ChannelSpecs::p_advancedControlWidget
protected

Definition at line 208 of file ChannelSpecs.hh.

◆ p_advancedControlLayout

QFormLayout* ChannelSpecs::p_advancedControlLayout
protected

Definition at line 209 of file ChannelSpecs.hh.

◆ p_transformationControl

Double4x4ControlElement* ChannelSpecs::p_transformationControl
protected

Definition at line 211 of file ChannelSpecs.hh.

◆ _oldVisibilityState

bool ChannelSpecs::_oldVisibilityState
protected

Definition at line 213 of file ChannelSpecs.hh.

◆ _hasNewData

bool ChannelSpecs::_hasNewData
protected

Definition at line 214 of file ChannelSpecs.hh.

◆ _lowerBoundUm

blitz::TinyVector<double,3> ChannelSpecs::_lowerBoundUm
protected

Definition at line 216 of file ChannelSpecs.hh.

◆ _upperBoundUm

blitz::TinyVector<double,3> ChannelSpecs::_upperBoundUm
protected

Definition at line 216 of file ChannelSpecs.hh.

◆ _elementSizeUm

blitz::TinyVector<double,3> ChannelSpecs::_elementSizeUm
protected

Definition at line 216 of file ChannelSpecs.hh.

◆ _originalTransformation

blitz::TinyMatrix<double,4,4> ChannelSpecs::_originalTransformation
protected

Definition at line 217 of file ChannelSpecs.hh.

◆ _transformation

blitz::TinyMatrix<double,4,4> ChannelSpecs::_transformation
protected

Definition at line 217 of file ChannelSpecs.hh.


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