iRoCS Toolbox
1.1.0
|
#include <SurfaceMarker.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 | |
SurfaceMarker (blitz::TinyVector< double, 3 > const &position=0.0, atb::SurfaceGeometry const *const surface=NULL, AnnotationChannelSpecs *channel=NULL) | |
SurfaceMarker (const SurfaceMarker &marker) | |
virtual | ~SurfaceMarker () |
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... | |
std::vector< atb::SurfaceGeometry::IndexT > const & | indices () const |
std::vector< atb::SurfaceGeometry::IndexT > & | indices () |
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 |
std::vector< atb::SurfaceGeometry::NormalT > const & | normals () const |
std::vector< atb::SurfaceGeometry::NormalT > & | normals () |
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... | |
SurfaceMarker & | operator= (const SurfaceMarker &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 |
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 | setIndices (std::vector< atb::SurfaceGeometry::IndexT > const &indices) |
void | setLabel (const int label) |
void | setManual (const bool manual) |
void | setNeedsFeatureUpdate (bool needsFeatureUpdate) |
void | setNormals (std::vector< atb::SurfaceGeometry::NormalT > const &normals) |
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 | setRelativePositionUm (const blitz::TinyVector< double, 3 > &positionUm) |
Set the marker position relative to the group transformation. More... | |
void | setSelected (bool selected) |
void | setVertices (std::vector< atb::SurfaceGeometry::VertexT > const &vertices) |
atb::SurfaceGeometry const & | surface () const |
atb::SurfaceGeometry & | surface () |
bool | updatesEnabled () const |
Check whether cache updates for this marker are enabled. More... | |
std::vector< atb::SurfaceGeometry::VertexT > const & | vertices () const |
std::vector< atb::SurfaceGeometry::VertexT > & | vertices () |
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 | |
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 |
blitz::TinyVector< float, 3 > | _randomColor |
std::map< ViewWidget *, MarkerRenderer * > | _renderers |
AnnotationChannelSpecs * | p_channel |
Definition at line 64 of file SurfaceMarker.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 |
SurfaceMarker::SurfaceMarker | ( | blitz::TinyVector< double, 3 > const & | position = 0.0 , |
atb::SurfaceGeometry const *const | surface = NULL , |
||
AnnotationChannelSpecs * | channel = NULL |
||
) |
SurfaceMarker::SurfaceMarker | ( | const SurfaceMarker & | marker | ) |
|
virtual |
SurfaceMarker& SurfaceMarker::operator= | ( | const SurfaceMarker & | marker | ) |
|
virtual |
Get the MarkerType enum value for this marker.
This method must be implemented by all sub-classes.
Reimplemented from PointMarker.
Reimplemented in CellMarker.
|
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 CellMarker.
|
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 CellMarker.
atb::SurfaceGeometry const& SurfaceMarker::surface | ( | ) | const |
atb::SurfaceGeometry& SurfaceMarker::surface | ( | ) |
std::vector<atb::SurfaceGeometry::VertexT> const& SurfaceMarker::vertices | ( | ) | const |
std::vector<atb::SurfaceGeometry::VertexT>& SurfaceMarker::vertices | ( | ) |
std::vector<atb::SurfaceGeometry::NormalT> const& SurfaceMarker::normals | ( | ) | const |
std::vector<atb::SurfaceGeometry::NormalT>& SurfaceMarker::normals | ( | ) |
std::vector<atb::SurfaceGeometry::IndexT> const& SurfaceMarker::indices | ( | ) | const |
std::vector<atb::SurfaceGeometry::IndexT>& SurfaceMarker::indices | ( | ) |
void SurfaceMarker::setVertices | ( | std::vector< atb::SurfaceGeometry::VertexT > const & | vertices | ) |
void SurfaceMarker::setNormals | ( | std::vector< atb::SurfaceGeometry::NormalT > const & | normals | ) |
void SurfaceMarker::setIndices | ( | std::vector< atb::SurfaceGeometry::IndexT > const & | indices | ) |
|
static |
|
static |
|
virtual |
Reimplemented from Marker.
Reimplemented in CellMarker.
|
virtual |
Reimplemented from PointMarker.
Reimplemented in CellMarker.
|
virtual |
Reimplemented from PointMarker.
Reimplemented in CellMarker.
|
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.
|
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.
|
virtualinherited |
Reimplemented in NucleusMarker, SHSurfaceMarker, and SphereMarker.
|
virtualinherited |
Reimplemented in NucleusMarker, SHSurfaceMarker, and SphereMarker.
|
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 |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |