iRoCS Toolbox
1.1.0
|
#include <VisualizationChannelSpecs.hh>
Public Types | |
enum | ChannelType { Data = 0x0001, Visualization = 0x0002, RGB = 0x0004, Annotation = 0x0008, SplineCurve = 0x0010, IRoCS = 0x0020, IRoCSSCT = 0x0040 } |
Public Slots | |
void | normalizeIndexRange () |
void | revalidate () override |
Reset the channel shape, element size, transformation and bounding box from the underlying data. More... | |
void | setAlpha (float alpha) |
void | setFillValue (int value) |
Set the value for subsequent flood fill operations. More... | |
void | setHasNewData (bool hasNewData) |
void | setIcon (QIcon const &icon) |
void | setName (std::string const &name) |
void | setTransformation (blitz::TinyMatrix< double, 4, 4 > const &transformation) override |
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 | |
VisualizationChannelSpecs (atb::Array< int, 3 > *data, MultiChannelModel *model=NULL, bool sign=false, int bitDepth=16) | |
~VisualizationChannelSpecs () | |
ChannelSpecsRenderer * | addRenderer (ViewWidget *view) |
float | alpha () const |
int | bitDepth () const |
QWidget * | channelControlWidget () const |
ChannelSpecs::ChannelType | channelType () const override |
ColorMap const & | colorMap () const |
ColorMap & | colorMap () |
atb::Array< int, 3 > const * | data () const |
atb::Array< int, 3 > * | data () |
bool | dataChanged () const |
Get the data changed flag. More... | |
virtual blitz::TinyVector< double, 3 > const & | elementSizeUm () const |
int | fillValue () const |
Get the value for subsequent flood fill operations. More... | |
void | floodFill (blitz::TinyVector< double, 3 > const &positionUm, bool mergeNeighboringSegments=false) |
Apply a flood fill operation at the given world coordinates in micrometers. More... | |
bool | hasNewData () const |
QIcon | icon () const |
int & | labelAt (blitz::TinyVector< double, 3 > const &positionUm) |
Get the integer label at the given coordinates relative to the upper left corner of the volume. More... | |
int & | labelAtVoxel (blitz::TinyVector< ptrdiff_t, 3 > const &pos) |
Get the integer label at the given pixel coordinates relative to the upper left corner of the volume. More... | |
virtual blitz::TinyVector< double, 3 > const & | lowerBoundUm () const |
MultiChannelModel * | model () const |
std::string | name () const |
void | pickFillValue (blitz::TinyVector< double, 3 > const &positionUm) |
Pick the value for subsequent flood fill operations from the current volume. More... | |
void | removeRenderer (ViewWidget *view) |
ChannelSpecsRenderer * | renderer (ViewWidget *view) const |
std::map< ViewWidget *, ChannelSpecsRenderer * > const & | renderers () const |
std::map< ViewWidget *, ChannelSpecsRenderer * > & | renderers () |
void | setBitDepth (int bitDepth) |
void | setDataChanged (bool dataChanged) |
Set the data changed flag. More... | |
void | setHasNewData () |
void | setModel (MultiChannelModel *model) |
void | setSign (bool sign) |
bool | sign () const |
std::string | stringValueAt (blitz::TinyVector< double, 3 > const &positionUm) const override |
Get a string representation of the value at the given 3D world coordinates in micrometers. More... | |
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 override |
Get a float representation of the value at the given 3D world coordinates in micrometers. More... | |
bool | visible () const |
Static Public Member Functions | |
static VisualizationChannelSpecs * | load () |
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 |
DoubleControlElement * | p_alphaControl |
QFormLayout * | p_channelControlLayout |
QWidget * | p_channelControlWidget |
MultiChannelModel * | p_model |
QToolButton * | p_toggleAdvancedButton |
Double4x4ControlElement * | p_transformationControl |
BoolControlElement * | p_visibleControl |
Definition at line 46 of file VisualizationChannelSpecs.hh.
|
inherited |
Enumerator | |
---|---|
Data | |
Visualization | |
RGB | |
Annotation | |
SplineCurve | |
IRoCS | |
IRoCSSCT |
Definition at line 60 of file ChannelSpecs.hh.
VisualizationChannelSpecs::VisualizationChannelSpecs | ( | atb::Array< int, 3 > * | data, |
MultiChannelModel * | model = NULL , |
||
bool | sign = false , |
||
int | bitDepth = 16 |
||
) |
VisualizationChannelSpecs::~VisualizationChannelSpecs | ( | ) |
|
overridevirtual |
Implements ChannelSpecs.
|
static |
atb::Array<int,3> const* VisualizationChannelSpecs::data | ( | ) | const |
atb::Array<int,3>* VisualizationChannelSpecs::data | ( | ) |
|
overridevirtual |
Get a float representation of the value at the given 3D world coordinates in micrometers.
positionUm | world coordinates in micrometers |
Implements ChannelSpecs.
|
overridevirtual |
Get a string representation of the value at the given 3D world coordinates in micrometers.
positionUm | world coordinates in micrometers |
Implements ChannelSpecs.
int& VisualizationChannelSpecs::labelAt | ( | blitz::TinyVector< double, 3 > const & | positionUm | ) |
Get the integer label at the given coordinates relative to the upper left corner of the volume.
The transformation matrix of the channel is ignored!
position_um | volume coordinates in micrometers |
std::out_of_range | if the given coordinates are out-of-bounds |
int& VisualizationChannelSpecs::labelAtVoxel | ( | blitz::TinyVector< ptrdiff_t, 3 > const & | pos | ) |
Get the integer label at the given pixel coordinates relative to the upper left corner of the volume.
The transformation matrix of the channel is ignored!
pos | volume coordinates in pixels |
std::out_of_range | if the given coordinates are out-of-bounds |
ColorMap const& VisualizationChannelSpecs::colorMap | ( | ) | const |
ColorMap& VisualizationChannelSpecs::colorMap | ( | ) |
void VisualizationChannelSpecs::pickFillValue | ( | blitz::TinyVector< double, 3 > const & | positionUm | ) |
Pick the value for subsequent flood fill operations from the current volume.
Sets fill value to the value at the specified world coordinates of this VisualizationChannelSpecs. Positions will be rounded to the nearest pixel. Out-of-bounds access leaves the fill value unchanged.
positionUm | The world coordinates in micrometers to set the fill value from. |
int VisualizationChannelSpecs::fillValue | ( | ) | const |
Get the value for subsequent flood fill operations.
void VisualizationChannelSpecs::floodFill | ( | blitz::TinyVector< double, 3 > const & | positionUm, |
bool | mergeNeighboringSegments = false |
||
) |
Apply a flood fill operation at the given world coordinates in micrometers.
The position will be rounded to the nearest pixel which will be used as seed. If the given position is out-of-bounds this operation has no effect. If merging of neighboring segments is requested, the 8-neighborhood of adjacent pixels with different label is tested if another region with the same label exists. If so, also fill the ridge pixel with the new label. If this operation succeeds it calls emitUpdateRequest() to inform other views of changes in this VisualizationChannelSpecs.
positionUm | The world coordinates in micrometers in which the flood fill operation is started |
mergeNeighboringSegments | If true, boundary pixels outside the filled segment will also be filled if they touch another segment with the same label and no segments with different labels are merged |
void VisualizationChannelSpecs::setSign | ( | bool | sign | ) |
bool VisualizationChannelSpecs::sign | ( | ) | const |
void VisualizationChannelSpecs::setBitDepth | ( | int | bitDepth | ) |
int VisualizationChannelSpecs::bitDepth | ( | ) | const |
void VisualizationChannelSpecs::setHasNewData | ( | ) |
bool VisualizationChannelSpecs::dataChanged | ( | ) | const |
Get the data changed flag.
This flag indicates that the content of the underlying atb::Array has changed and requires saving.
void VisualizationChannelSpecs::setDataChanged | ( | bool | dataChanged | ) |
Set the data changed flag.
This flag indicates that the content of the underlying atb::Array has changed and requires saving. This flag should be cleared (set to false) after saving the dataset.
dataChanged | The new data changed flag value |
|
virtual |
Implements ChannelSpecs.
|
slot |
Set the value for subsequent flood fill operations.
value | The new fill value |
|
slot |
|
overrideslot |
|
overrideslot |
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.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
virtualinherited |
Reimplemented in SplineCurveChannelSpecs, IRoCSSCTChannelSpecs, and IRoCSChannelSpecs.
|
virtualinherited |
Reimplemented in SplineCurveChannelSpecs, IRoCSSCTChannelSpecs, and IRoCSChannelSpecs.
|
virtualinherited |
Reimplemented in AnnotationChannelSpecs, SplineCurveChannelSpecs, IRoCSSCTChannelSpecs, and IRoCSChannelSpecs.
|
virtualinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Check whether cache updates for this channel are enabled.
|
slotinherited |
|
slotinherited |
|
slotinherited |
|
slotinherited |
|
slotinherited |
|
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.
enable | true to enable cache updates, false to disable cache updates |
|
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.
|
signalinherited |
|
signalinherited |
|
signalinherited |
|
signalinherited |
|
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.
|
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.
|
staticinherited |
Definition at line 70 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 200 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 201 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 202 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 203 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 204 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 205 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 207 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 208 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 209 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 211 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 213 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 214 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 216 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 216 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 216 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 217 of file ChannelSpecs.hh.
|
protectedinherited |
Definition at line 217 of file ChannelSpecs.hh.