iRoCS Toolbox
1.1.0
|
#include <SphereMarker.hh>
Public Types | |
enum | MarkerType { Point = 0x0000, Sphere = 0x0001, Nucleus = 0x0002, Cylinder = 0x0003, SHSurface = 0x0004, Surface = 0x005, Cell = 0x006 } |
Marker.hh "liblabelling_qt4/Marker.hh". More... | |
Public Slots | |
void | setUpdatesEnabled (bool enable) |
Enables/Disables cache updates for this marker. More... | |
void | update () |
Explicitely trigger a cache update for all associated renderers. More... | |
Public Member Functions | |
SphereMarker (AnnotationChannelSpecs *channel=NULL) | |
SphereMarker (const blitz::TinyVector< double, 3 > &position, const double radius=5.0, AnnotationChannelSpecs *channel=NULL) | |
SphereMarker (const SphereMarker &marker) | |
virtual | ~SphereMarker () |
virtual MarkerRenderer * | addRenderer (ViewWidget *view) |
Add a rendering engine for the given view to this marker. More... | |
blitz::TinyVector< double, 3 > | boundingBoxLowerBoundUm () const |
Get the lower bound of the marker's bounding box for all dimensions. More... | |
blitz::TinyVector< double, 3 > | boundingBoxUpperBoundUm () const |
Get the upper bound of the marker's bounding box for all dimensions. More... | |
AnnotationChannelSpecs * | channel () const |
Get the channel this marker belongs to. More... | |
virtual void | copyFromATBNucleus (atb::Nucleus const &nc) |
virtual void | copyToATBNucleus (atb::Nucleus &nc) const |
double & | feature (size_t index) |
const std::vector< double > & | features () const |
std::vector< double >::iterator | featuresBegin () |
std::vector< double >::iterator | featuresEnd () |
std::string | id () const |
Get the marker id. More... | |
virtual bool | inherits (Marker::MarkerType type) const |
Checks whether this marker is of the given MarkerType or derives from it. More... | |
int | label () const |
virtual void | loadFromMap (std::map< std::string, std::string > const &values) |
bool | manual () const |
virtual Marker::MarkerType | markerType () const |
Get the MarkerType enum value for this marker. More... | |
bool | needsFeatureUpdate () const |
virtual bool | occupiesPositionUm (blitz::TinyVector< double, 3 > const &positionUm) const |
This methods checks whether the given micrometer world position is within the marker volume and is mainly used to test whether it needs to be drawn by its renderers. More... | |
SphereMarker & | operator= (const SphereMarker &marker) |
double | phi () const |
blitz::TinyVector< double, 3 > | positionUm () const |
Get the absolute marker world position in micrometers. More... | |
int | predictedLabel () const |
const std::map< int, double > & | probabilityMap () const |
std::map< int, double >::iterator | probabilityMapBegin () |
std::map< int, double >::iterator | probabilityMapEnd () |
std::map< int, double >::iterator | probabilityMapFind (int key) |
double | qcDistanceUm () const |
double | radialDistanceUm () const |
double | radiusUm () const |
blitz::TinyVector< float, 3 > const & | randomColor () const |
If the view type is set to random use this color to obtain the marker color to use. More... | |
blitz::TinyVector< double, 3 > | relativePositionUm () const |
Get the marker position relative to the group transformation. More... | |
void | removeRenderer (ViewWidget *view) |
Remove the renderer for the given view. More... | |
MarkerRenderer * | renderer (ViewWidget *view) const |
Get the rendering engine for this Marker and the given view. More... | |
const std::map< ViewWidget *, MarkerRenderer * > & | renderers () const |
Get a map containing all ViewWidgets this Marker is currently drawn in and the corresponding MarkerRenderers. More... | |
virtual void | saveCSV (std::ofstream &out) const |
bool | selected () const |
void | setChannel (AnnotationChannelSpecs *channel) |
Add this marker to the given channel. More... | |
void | setId (const std::string &id) |
Set the marker id. More... | |
void | setLabel (const int label) |
void | setManual (const bool manual) |
void | setNeedsFeatureUpdate (bool needsFeatureUpdate) |
void | setPhi (const double phi) |
void | setPositionUm (const blitz::TinyVector< double, 3 > &positionUm) |
Set the absolute marker world position in micrometers. More... | |
void | setPredictedLabel (const int label) |
void | setQcDistanceUm (const double qcDistanceUm) |
void | setRadialDistanceUm (const double radialDistanceUm) |
void | setRadiusUm (const double radius) |
void | setRelativePositionUm (const blitz::TinyVector< double, 3 > &positionUm) |
Set the marker position relative to the group transformation. More... | |
void | setSelected (bool selected) |
bool | updatesEnabled () const |
Check whether cache updates for this marker are enabled. More... | |
virtual void | writeCSVHeader (std::ofstream &out) const |
Static Public Member Functions | |
static void | load (AnnotationChannelSpecs *channel, BlitzH5File const &inFile, std::string const &group, iRoCS::ProgressReporter *pr=NULL) |
static MarkerType | markerTypeFromString (QString const &name) |
Get the MarkerType corresponding to the given string representation. More... | |
static QString | markerTypeToString (Marker::MarkerType m) |
Get the string representation of the given MarkerType. More... | |
static void | save (AnnotationChannelSpecs const *channel, BlitzH5File &outFile, std::string const &group, iRoCS::ProgressReporter *pr=NULL) |
static QStringList | supportedMarkerTypes () |
Get a QStringList containing string representations of all marker types. More... | |
Protected Member Functions | |
virtual void | _updateBoundingBox () const |
void | setFeatures (const std::vector< double > &features) |
void | setProbabilityMap (const std::map< int, double > &probabilityMap) |
Static Protected Member Functions | |
static void | _loadFixedSize (blitz::Array< bool, 1 > &buf, BlitzH5File const &inFile, std::string const &dsName, bool showWarnings=false) |
template<typename DataT > | |
static void | _loadFixedSize (blitz::Array< DataT, 1 > &buf, BlitzH5File const &inFile, std::string const &dsName, bool showWarnings=false) |
Protected Attributes | |
blitz::TinyVector< double, 3 > | _boundingBoxLowerBoundUm |
This variable contains the lower bound of this marker in micrometers relative to its world position in micrometers. More... | |
blitz::TinyVector< double, 3 > | _boundingBoxUpperBoundUm |
This variable contains the lower bound of this marker in micrometers relative to its world position in micrometers. More... | |
bool | _boundingBoxUpToDate |
If this variable is set to false, the next query for the marker's bounding box will update it. More... | |
std::vector< double > | _features |
std::string | _id |
int | _label |
bool | _manual |
bool | _needsFeatureUpdate |
double | _phi |
blitz::TinyVector< double, 3 > | _positionUm |
int | _predictedLabel |
std::map< int, double > | _probabilityMap |
double | _qcDistance |
double | _radialDistance |
double | _radiusUm |
blitz::TinyVector< float, 3 > | _randomColor |
std::map< ViewWidget *, MarkerRenderer * > | _renderers |
AnnotationChannelSpecs * | p_channel |
Definition at line 83 of file SphereMarker.hh.
|
inherited |
Marker.hh "liblabelling_qt4/Marker.hh".
The MarkerType enumeration enumerates all available marker types.
If you want to add a new marker type you will have to add it to this enum and change supportedMarkerTypes(), markerTypeFromString() and markerTypeToString().
Enumerator | |
---|---|
Point | |
Sphere | |
Nucleus | |
Cylinder | |
SHSurface | |
Surface | |
Cell |
SphereMarker::SphereMarker | ( | AnnotationChannelSpecs * | channel = NULL | ) |
SphereMarker::SphereMarker | ( | const blitz::TinyVector< double, 3 > & | position, |
const double | radius = 5.0 , |
||
AnnotationChannelSpecs * | channel = NULL |
||
) |
SphereMarker::SphereMarker | ( | const SphereMarker & | marker | ) |
|
virtual |
SphereMarker& SphereMarker::operator= | ( | const SphereMarker & | marker | ) |
double SphereMarker::radiusUm | ( | ) | const |
void SphereMarker::setRadiusUm | ( | const double | radius | ) |
|
virtual |
Get the MarkerType enum value for this marker.
This method must be implemented by all sub-classes.
Reimplemented from PointMarker.
Reimplemented in NucleusMarker, CylinderMarker, and SHSurfaceMarker.
|
virtual |
Checks whether this marker is of the given MarkerType or derives from it.
This method must be implemented by all sub-classes.
true
if this marker is of the given MarkerType or a descendent, false
otherwise Reimplemented from PointMarker.
Reimplemented in NucleusMarker, CylinderMarker, and SHSurfaceMarker.
|
virtual |
Add a rendering engine for the given view to this marker.
For each marker type - view type pair such a Renderer must exist, that is responsible to get an appropriate visualization of the marker in the corresponding type of view. A marker can be rendered in arbitrarily many views simulataneously. This method, however, must take care that the marker is registered to a specific view at most once. Markers without associated renderers will not be drawn at all.
view | The ViewWidget to register this marker to for rendering |
Reimplemented from PointMarker.
Reimplemented in NucleusMarker, CylinderMarker, and SHSurfaceMarker.
|
static |
|
static |
|
virtual |
Reimplemented from Marker.
Reimplemented in NucleusMarker, CylinderMarker, and SHSurfaceMarker.
|
virtual |
Reimplemented from PointMarker.
Reimplemented in NucleusMarker, CylinderMarker, and SHSurfaceMarker.
|
virtual |
Reimplemented from PointMarker.
Reimplemented in NucleusMarker, CylinderMarker, and SHSurfaceMarker.
|
virtual |
This methods checks whether the given micrometer world position is within the marker volume and is mainly used to test whether it needs to be drawn by its renderers.
It need not be exact, but should at least respect the bounding box of the Marker.
positionUm | The world position in micrometers to check for intersection with this marker |
true
if the position is within the marker, false
otherwise Reimplemented from PointMarker.
Reimplemented in CylinderMarker, and SHSurfaceMarker.
|
virtual |
Reimplemented from Marker.
Reimplemented in NucleusMarker, and SHSurfaceMarker.
|
virtual |
Reimplemented from Marker.
Reimplemented in NucleusMarker, and SHSurfaceMarker.
|
protectedvirtual |
Reimplemented from PointMarker.
Reimplemented in CylinderMarker.
|
staticinherited |
Get a QStringList containing string representations of all marker types.
When the user selects to add a new Annotation channel, the items of this list are presented as choices for the marker type of the new annotation channel. So if you want to add a new marker type that is only automatically generated or don't want the user to be able to manually create an annotation channel of that marker type, just do not add it to the list.
|
staticinherited |
Get the MarkerType corresponding to the given string representation.
If the string has no corresponding MarkerType the program will report an error and immediately shut down!
name | The string representation of a MarkerType |
|
staticinherited |
Get the string representation of the given MarkerType.
m | The MarkerType |
|
inherited |
Add this marker to the given channel.
This implies removing it from its old channel if there was one. You can pass NULL here if you want to remove any channel association from this marker.
channel | The new channel this marker belongs to |
|
inherited |
Get the channel this marker belongs to.
If the marker has no parent NULL is returned.
|
inherited |
Remove the renderer for the given view.
view | The view to remove this Marker from |
|
inherited |
Get the rendering engine for this Marker and the given view.
view | The view to get the renderer for this marker for |
|
inherited |
Get a map containing all ViewWidgets this Marker is currently drawn in and the corresponding MarkerRenderers.
|
inherited |
|
inherited |
Set the marker id.
This attribute is never stored and only used for visualization in the current session.
id | The session id of this marker |
|
inherited |
Get the absolute marker world position in micrometers.
The result is just the relative position transformed by the channel transformation matrix.
|
inherited |
Set the absolute marker world position in micrometers.
Internally this alters the relative position by applying the inverse channel transformation to the given position.
positionUm | The absolute world position in micrometers |
|
inherited |
Get the marker position relative to the group transformation.
|
inherited |
Set the marker position relative to the group transformation.
positionUm | The marker position in micrometers in the coordinate system defined by the channel transformation |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
If the view type is set to random use this color to obtain the marker color to use.
|
inherited |
|
inherited |
|
inherited |
Get the lower bound of the marker's bounding box for all dimensions.
|
inherited |
Get the upper bound of the marker's bounding box for all dimensions.
|
inherited |
Check whether cache updates for this marker are enabled.
|
slotinherited |
Enables/Disables cache updates for this marker.
If you programmatically apply many subsequent changes to a marker 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.
|
protectedinherited |
|
protectedinherited |
|
staticprotectedinherited |
|
inlinestaticprotectedinherited |
|
protected |
Definition at line 130 of file SphereMarker.hh.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |