An action that allow to draw contours.
A contour is a data structure representing a pointwise annotation, generally a spline. It is defined by the type of pointwise annotation e.g. closed spline, closed polyline, open spline, etc, a sequence of points, a label value, a given name, a creation type (automatic or manual) and some additional secondary properties,
- See also
- Seg::Contour. The contours are saved in a data component.
On 2D images, all types of Contours are used to create a label map. On 3D data, only open annotations are used.
A label map generated from a closed contour can be refined with the "auto-refine" option: this option uses image information to automatically adjust the label map to the boundaries of the enclosed area. The "refimement margin" parameter controls the sensitivity of the refinement. The applied label map for open contours is controlled by the parameters "radius" and "adaptiveness". The former is used to define how much area around the annotation is taken into account, while the latter is the parameter controlling the sensitivity to the image information.
The contours are displayed in a view table with their name, frame number (if applicable) and creation type.
The action has multiple "operations" in itself which are essentially sub-actions. These are Draw, Clear, Generate, Import-Export and Propagate. The Draw operation allows to change the settings for the contour being actively drawn. The Clear operation gives batch-wise opportunities to delete contours on frame data. The Generate operation enables the user to create contours from label maps. The Import-Export operation is for exporting/importing json/xml files with contour data. The Propagate operation enables the generation of new contours via interpolation between contours on different frames if such exist.
|
| bool | isProjectCompatible () const override |
| bool | isProjectCompatible (const Project::ProjectTypes &, bool) const override |
| bool | areActiveLayersCompatible () const override |
| bool | isDataSetCompatible (const DataSet &) const override |
| QIcon | icon () const override |
| QString | text () const override |
| QString | description () const override |
| QString | docPath () const override |
| bool | isReadOnly () const override |
| QWidget * | ui (QWidget *parent=nullptr) override |
| void | activate () override |
| void | deactivate () override |
| void | dataSetChanged () override |
| bool | inputEvent (QEvent *event) override |
| void | configuration (Properties *p) const override |
| | Serialize the current object configuration into the given Properties object.
|
| void | configure (const Properties *p) override |
| | Configure this object instance by de-serializing the given Properties.
|
| void | onManipulatorEvent (Manipulator *src, void *eventData) override |
| | Called when an event occurs.
|
|
void | setSkipFactor (int skip) |
|
void | setPropagationDirection (DataSetPropagationAlgorithm::PropagationDirection dir) |
|
virtual void | init () |
| virtual void | configureDefaults () |
| | Retrieve the properties of this object, replaces values with their defaults and sets it again.
|
|
void | registerParameter (ParameterBase *param) |
| | Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
|
|
void | unregisterParameter (const ParameterBase *param) |
| | Remove the given Parameter or SubProperty from the list of registered parameters.
|
|
| Configurable (const Configurable &rhs) |
|
| Configurable (Configurable &&rhs) noexcept |
|
Configurable & | operator= (const Configurable &) |
|
Configurable & | operator= (Configurable &&) noexcept |
|
| SignalReceiver ()=default |
| | Default constructor.
|
|
| SignalReceiver (const SignalReceiver &other) |
| | Copy constructor, does not copy any existing signal connections from other.
|
|
SignalReceiver & | operator= (SignalReceiver rhs) |
| | Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
|
|
virtual | ~SignalReceiver () |
| | Virtual destructor disconnects from all connected signals.
|
|
|
void | startDrawContour (const std::vector< vec3 > &points={}) |
|
void | finalizeDrawContour (bool accept) |
|
std::string | generateContourName (const Seg::Contour &contour) const |
| | Generates a name as "TypeName" + "IndexOfType".
|
| void | removeContourSegmentation (std::vector< const Seg::Contour * > contours={}, int frame=-1) |
| | Remove the segmentation from the contour(s) from the label map.
|
| bool | updateContour (Seg::Contour &contour) |
| | Update the contour member variables according to the GUI state.
|
|
void | removeContour () |
|
void | writeContoursToFrame (int frameIdx) |
|
std::pair< int, int > | getBoundariesForPropagation (const std::string &name, const int labelValue) const |
| void | removeAllContours (bool activeLabelOnly) |
| | This is used when a collection of contours are supposed to be removed.
|
|
void | retrieveContour (int whichContour) |
|
void | syncContour2GUIState () |
| | Sync the active contour to the GUI.
|
|
void | generateContours (const std::vector< unsigned char > &labelValues, const std::pair< int, int > &range) |
| | Create and apply contours for the given label values and the given range of frames.
|
|
void | generateContours () |
| | Create and apply contours for this frame and for all labels values.
|
|
void | propagateContours () |
|
void | importContours (const Filesystem::Path &fileName) |
| | Import/Export functions for contours.
|
|
void | exportContours (const Filesystem::Path &fileName) |
|
void | addDrawingManip () |
|
void | removeDrawingManip () |
|
void | addHoverManipulator () |
|
void | removeHoverManipulator () |
|
void | createAnnotation (const std::vector< vec3 > &points={}, std::string type="") |
|
void | addAnnotation (GlPointBasedAnnotation *annotation=nullptr) |
|
void | removeAnnotation (GlPointBasedAnnotation *annotation=nullptr) |
|
void | showPreview () |
|
void | hidePreview () |
|
void | updateWidgetsState () |
|
void | updateContourTable () |
|
void | showTableContextMenu (const QPoint &pos) |
|
void | updatePreview () |
|
void | updatePreviewColor () |
|
bool | isClosedContour () const |
|
void | waitForInstanceImage () |
|
void | disconnectAll () |
| | Disconnects all existing connections.
|