iRoCS Toolbox  1.1.0
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Slots | Protected Attributes
AnnotationChannelSpecs Class Reference

#include <AnnotationChannelSpecs.hh>

Inheritance diagram for AnnotationChannelSpecs:
Collaboration diagram for AnnotationChannelSpecs:

Public Types

enum  ChannelType {
  Data = 0x0001, Visualization = 0x0002, RGB = 0x0004, Annotation = 0x0008,
  SplineCurve = 0x0010, IRoCS = 0x0020, IRoCSSCT = 0x0040
}
 
typedef std::vector< Marker * >::const_iterator const_iterator
 
typedef std::vector< Marker * >::iterator iterator
 
enum  Operation {
  AddMarker = 0x0000, LabelMarker = 0x0001, EditMarker = 0x0002, DeleteMarker = 0x0003,
  UnknownOperation = 0xffff
}
 

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 setCoordinateUpdateButtonEnabled (bool enable)
 
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 featureSizeChanged (int size)
 
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

 AnnotationChannelSpecs (Marker::MarkerType markerType, MultiChannelModel *model=NULL)
 
 ~AnnotationChannelSpecs ()
 
MarkeraddMarker (blitz::TinyVector< double, 3 > const &positionUm)
 
void addMarker (Marker *marker)
 
ChannelSpecsRendereraddRenderer (ViewWidget *view)
 
float alpha () const
 
float alphaForLabel (int label) const
 
std::map< int, float > & alphaMap ()
 
const_iterator begin () const
 
iterator begin ()
 
QWidget * channelControlWidget () const
 
ChannelSpecs::ChannelType channelType () const
 
MarkerclosestMarker (blitz::TinyVector< double, 3 > const &positionUm, bool intersecting=false)
 
blitz::TinyVector< float, 3 > colorForLabel (int label) const
 
std::map< int, blitz::TinyVector< float, 3 > > & colorMap ()
 
blitz::TinyVector< double, 3 > const & elementSizeUm () const
 
const_iterator end () const
 
iterator end ()
 
bool hasNewData () const
 
QIcon icon () const
 
void labelMarker (Marker *marker)
 
HDF5DataIO::RetVal load (std::string const &fileName, iRoCS::ProgressReporter *pr=NULL)
 
void load (BlitzH5File const &inFile, iRoCS::ProgressReporter *pr=NULL)
 
virtual blitz::TinyVector< double, 3 > const & lowerBoundUm () const
 
MarkerControlWidgetmarkerControlWidget ()
 
MarkerPresetWidgetmarkerPresetWidget ()
 
std::vector< Marker * > const & markers () const
 
Marker::MarkerType markerType () const
 
MultiChannelModelmodel () const
 
std::string name () const
 
Marker const * operator[] (size_t index) const
 
Markeroperator[] (size_t index)
 
void removeMarker (Marker *marker)
 
void removeRenderer (ViewWidget *view)
 
ChannelSpecsRendererrenderer (ViewWidget *view) const
 
std::map< ViewWidget *, ChannelSpecsRenderer * > const & renderers () const
 
std::map< ViewWidget *, ChannelSpecsRenderer * > & renderers ()
 
void resizeFeatures (size_t newSize)
 
HDF5DataIO::RetVal save (std::string const &fileName, iRoCS::ProgressReporter *pr=NULL) const
 
void save (BlitzH5File &outFile, iRoCS::ProgressReporter *pr=NULL) const
 
void saveCSV (std::string const &fileName) const
 
Marker const * selectedMarker () const
 
MarkerselectedMarker ()
 
Operation selectedOperation () const
 
int selectedViewType () const
 
void selectMarker (Marker *marker)
 
void setAlphaForLabel (int label, float alpha)
 
void setColorForLabel (int label, blitz::TinyVector< float, 3 > const &color)
 
void setModel (MultiChannelModel *model)
 
std::string stringValueAt (blitz::TinyVector< double, 3 > const &positionUm) const
 
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
 
float valueAt (blitz::TinyVector< double, 3 > const &positionUm) const
 
bool visible () const
 

Static Public Member Functions

static AnnotationChannelSpecsloadCSV (std::string const &fileName)
 

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 41 of file AnnotationChannelSpecs.hh.

Member Typedef Documentation

◆ const_iterator

Definition at line 52 of file AnnotationChannelSpecs.hh.

◆ iterator

Definition at line 53 of file AnnotationChannelSpecs.hh.

Member Enumeration Documentation

◆ Operation

Enumerator
AddMarker 
LabelMarker 
EditMarker 
DeleteMarker 
UnknownOperation 

Definition at line 48 of file AnnotationChannelSpecs.hh.

◆ ChannelType

enum ChannelSpecs::ChannelType
inherited
Enumerator
Data 
Visualization 
RGB 
Annotation 
SplineCurve 
IRoCS 
IRoCSSCT 

Definition at line 60 of file ChannelSpecs.hh.

Constructor & Destructor Documentation

◆ AnnotationChannelSpecs()

AnnotationChannelSpecs::AnnotationChannelSpecs ( Marker::MarkerType  markerType,
MultiChannelModel model = NULL 
)

◆ ~AnnotationChannelSpecs()

AnnotationChannelSpecs::~AnnotationChannelSpecs ( )

Member Function Documentation

◆ channelType()

ChannelSpecs::ChannelType AnnotationChannelSpecs::channelType ( ) const
virtual

Implements ChannelSpecs.

◆ valueAt()

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

Implements ChannelSpecs.

◆ stringValueAt()

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

Implements ChannelSpecs.

◆ selectedViewType()

int AnnotationChannelSpecs::selectedViewType ( ) const

◆ selectedOperation()

Operation AnnotationChannelSpecs::selectedOperation ( ) const

◆ markerPresetWidget()

MarkerPresetWidget* AnnotationChannelSpecs::markerPresetWidget ( )

◆ markerControlWidget()

MarkerControlWidget* AnnotationChannelSpecs::markerControlWidget ( )

◆ closestMarker()

Marker* AnnotationChannelSpecs::closestMarker ( blitz::TinyVector< double, 3 > const &  positionUm,
bool  intersecting = false 
)

◆ addMarker() [1/2]

Marker* AnnotationChannelSpecs::addMarker ( blitz::TinyVector< double, 3 > const &  positionUm)

◆ addMarker() [2/2]

void AnnotationChannelSpecs::addMarker ( Marker marker)

◆ labelMarker()

void AnnotationChannelSpecs::labelMarker ( Marker marker)

◆ removeMarker()

void AnnotationChannelSpecs::removeMarker ( Marker marker)

◆ selectMarker()

void AnnotationChannelSpecs::selectMarker ( Marker marker)

◆ selectedMarker() [1/2]

Marker const* AnnotationChannelSpecs::selectedMarker ( ) const

◆ selectedMarker() [2/2]

Marker* AnnotationChannelSpecs::selectedMarker ( )

◆ markerType()

Marker::MarkerType AnnotationChannelSpecs::markerType ( ) const

◆ colorForLabel()

blitz::TinyVector<float,3> AnnotationChannelSpecs::colorForLabel ( int  label) const

◆ setColorForLabel()

void AnnotationChannelSpecs::setColorForLabel ( int  label,
blitz::TinyVector< float, 3 > const &  color 
)

◆ colorMap()

std::map< int,blitz::TinyVector<float,3> >& AnnotationChannelSpecs::colorMap ( )

◆ alphaForLabel()

float AnnotationChannelSpecs::alphaForLabel ( int  label) const

◆ setAlphaForLabel()

void AnnotationChannelSpecs::setAlphaForLabel ( int  label,
float  alpha 
)

◆ alphaMap()

std::map< int,float >& AnnotationChannelSpecs::alphaMap ( )

◆ resizeFeatures()

void AnnotationChannelSpecs::resizeFeatures ( size_t  newSize)

◆ markers()

std::vector<Marker*> const& AnnotationChannelSpecs::markers ( ) const

◆ begin() [1/2]

const_iterator AnnotationChannelSpecs::begin ( ) const

◆ begin() [2/2]

iterator AnnotationChannelSpecs::begin ( )

◆ end() [1/2]

const_iterator AnnotationChannelSpecs::end ( ) const

◆ end() [2/2]

iterator AnnotationChannelSpecs::end ( )

◆ operator[]() [1/2]

Marker const* AnnotationChannelSpecs::operator[] ( size_t  index) const

◆ operator[]() [2/2]

Marker* AnnotationChannelSpecs::operator[] ( size_t  index)

◆ addRenderer()

ChannelSpecsRenderer* AnnotationChannelSpecs::addRenderer ( ViewWidget view)
virtual

Implements ChannelSpecs.

◆ elementSizeUm()

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

Reimplemented from ChannelSpecs.

◆ load() [1/2]

HDF5DataIO::RetVal AnnotationChannelSpecs::load ( std::string const &  fileName,
iRoCS::ProgressReporter pr = NULL 
)

◆ load() [2/2]

void AnnotationChannelSpecs::load ( BlitzH5File const &  inFile,
iRoCS::ProgressReporter pr = NULL 
)

◆ save() [1/2]

HDF5DataIO::RetVal AnnotationChannelSpecs::save ( std::string const &  fileName,
iRoCS::ProgressReporter pr = NULL 
) const

◆ save() [2/2]

void AnnotationChannelSpecs::save ( BlitzH5File outFile,
iRoCS::ProgressReporter pr = NULL 
) const

◆ saveCSV()

void AnnotationChannelSpecs::saveCSV ( std::string const &  fileName) const

◆ loadCSV()

static AnnotationChannelSpecs* AnnotationChannelSpecs::loadCSV ( std::string const &  fileName)
static

◆ featureSizeChanged

void AnnotationChannelSpecs::featureSizeChanged ( int  size)
signal

◆ setCoordinateUpdateButtonEnabled

void AnnotationChannelSpecs::setCoordinateUpdateButtonEnabled ( bool  enable)
slot

◆ setModel()

void ChannelSpecs::setModel ( MultiChannelModel model)
inherited

◆ model()

MultiChannelModel* ChannelSpecs::model ( ) const
inherited

◆ name()

std::string ChannelSpecs::name ( ) const
inherited

◆ icon()

QIcon ChannelSpecs::icon ( ) const
inherited

◆ alpha()

float ChannelSpecs::alpha ( ) const
inherited

◆ visible()

bool ChannelSpecs::visible ( ) const
inherited

◆ hasNewData()

bool ChannelSpecs::hasNewData ( ) const
inherited

◆ lowerBoundUm()

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

◆ upperBoundUm()

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

◆ transformation()

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

◆ channelControlWidget()

QWidget* ChannelSpecs::channelControlWidget ( ) const
inherited

◆ removeRenderer()

void ChannelSpecs::removeRenderer ( ViewWidget view)
inherited

◆ renderer()

ChannelSpecsRenderer* ChannelSpecs::renderer ( ViewWidget view) const
inherited

◆ renderers() [1/2]

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

◆ renderers() [2/2]

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

◆ updatesEnabled()

bool ChannelSpecs::updatesEnabled ( ) const
inherited

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)
slotinherited

◆ setIcon

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

◆ setAlpha

void ChannelSpecs::setAlpha ( float  alpha)
slotinherited

◆ setVisible

void ChannelSpecs::setVisible ( bool  visible)
slotinherited

◆ setHasNewData

void ChannelSpecs::setHasNewData ( bool  hasNewData)
slotinherited

◆ setTransformation

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

◆ setUpdatesEnabled

void ChannelSpecs::setUpdatesEnabled ( bool  enable)
slotinherited

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 ( )
slotinherited

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 ( )
virtualslotinherited

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 
)
signalinherited

◆ iconChanged

void ChannelSpecs::iconChanged ( )
signalinherited

◆ nameChanged

void ChannelSpecs::nameChanged ( )
signalinherited

◆ transformationChanged

void ChannelSpecs::transformationChanged ( )
signalinherited

◆ viewChanged

void ChannelSpecs::viewChanged ( )
signalinherited

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 ( )
protectedslotinherited

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
staticinherited

Definition at line 70 of file ChannelSpecs.hh.

◆ p_model

MultiChannelModel* ChannelSpecs::p_model
protectedinherited

Definition at line 200 of file ChannelSpecs.hh.

◆ _renderers

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

Definition at line 201 of file ChannelSpecs.hh.

◆ p_channelControlWidget

QWidget* ChannelSpecs::p_channelControlWidget
protectedinherited

Definition at line 202 of file ChannelSpecs.hh.

◆ p_channelControlLayout

QFormLayout* ChannelSpecs::p_channelControlLayout
protectedinherited

Definition at line 203 of file ChannelSpecs.hh.

◆ p_alphaControl

DoubleControlElement* ChannelSpecs::p_alphaControl
protectedinherited

Definition at line 204 of file ChannelSpecs.hh.

◆ p_visibleControl

BoolControlElement* ChannelSpecs::p_visibleControl
protectedinherited

Definition at line 205 of file ChannelSpecs.hh.

◆ p_toggleAdvancedButton

QToolButton* ChannelSpecs::p_toggleAdvancedButton
protectedinherited

Definition at line 207 of file ChannelSpecs.hh.

◆ p_advancedControlWidget

QWidget* ChannelSpecs::p_advancedControlWidget
protectedinherited

Definition at line 208 of file ChannelSpecs.hh.

◆ p_advancedControlLayout

QFormLayout* ChannelSpecs::p_advancedControlLayout
protectedinherited

Definition at line 209 of file ChannelSpecs.hh.

◆ p_transformationControl

Double4x4ControlElement* ChannelSpecs::p_transformationControl
protectedinherited

Definition at line 211 of file ChannelSpecs.hh.

◆ _oldVisibilityState

bool ChannelSpecs::_oldVisibilityState
protectedinherited

Definition at line 213 of file ChannelSpecs.hh.

◆ _hasNewData

bool ChannelSpecs::_hasNewData
protectedinherited

Definition at line 214 of file ChannelSpecs.hh.

◆ _lowerBoundUm

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

Definition at line 216 of file ChannelSpecs.hh.

◆ _upperBoundUm

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

Definition at line 216 of file ChannelSpecs.hh.

◆ _elementSizeUm

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

Definition at line 216 of file ChannelSpecs.hh.

◆ _originalTransformation

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

Definition at line 217 of file ChannelSpecs.hh.

◆ _transformation

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

Definition at line 217 of file ChannelSpecs.hh.


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