Algorithm which segments bone in an ultrasound sweep.
This algorithm supports bone detection and segmentation. Many side output parameters can be acquired via the getters.
|
|
| BoneSegmentationAlgorithm (const std::vector< UltrasoundSweep * > &sweeps) |
| |
| void | configure (const Properties *p) override |
| | Configure this object instance by de-serializing the given Properties.
|
| |
| void | configuration (Properties *p) const override |
| | Serialize the current object configuration into the given Properties object.
|
| |
|
void | computeCompoundedProbability () |
| | Execute the detection on whole volume.
|
| |
|
void | computeDetection (int slice) |
| | Execute only the detection.
|
| |
|
void | computeSegmentation () |
| | Execute only the segmentation (assumes that the detection has already been performed)
|
| |
|
virtual void | detectOutliers () |
| | Estimate how reliable the segmentations are.
|
| |
| void | compute () override |
| | Computes bone segmentation and prepares it for output.
|
| |
| OwningDataList | takeOutput () override |
| | Get the calculated results.
|
| |
| UltrasoundSweep * | sweep () const |
| |
| int | bestSlice (UltrasoundSweep *sweep) const |
| |
| bool | isResultAvailable (int slice, UltrasoundSweep *sweep) const |
| |
| const std::vector< vec3 > & | detectedBone (int slice, UltrasoundSweep *sweep) const |
| | Returns the list of detected bone centerline points for a specific ultrasound slice.
|
| |
| const std::vector< vec3 > & | segmentedBone (int slice, UltrasoundSweep *sweep) const |
| | Returns the segmented bone centerline points for a specific ultrasound slice.
|
| |
| const std::vector< double > & | outlierness (UltrasoundSweep *sweep) const |
| |
| const std::vector< double > & | detectionConfidence (UltrasoundSweep *sweep) const |
| |
| const std::vector< std::vector< double > > & | boneClassification (UltrasoundSweep *sweep) const |
| |
|
std::vector< std::unique_ptr< PointCloud > > | extractPointClouds (int exportSkip, double outliernessMaxThreshold, std::vector< double > *outliernessOut) const |
| |
|
| BoneSegmentationBaseAlgorithm (SharedImageSet *images, SharedImageSet *labels=nullptr) |
| |
| void | configure (const Properties *p) override |
| | Configure this object instance by de-serializing the given Properties.
|
| |
| void | configuration (Properties *p) const override |
| | Serialize the current object configuration into the given Properties object.
|
| |
| void | compute () override |
| | Execute the algorithm.
|
| |
| OwningDataList | takeOutput () override |
| | Return any new Data that was created by the Algorithm during the last call to compute().
|
| |
|
virtual bool | useDefaultAlgorithmController () const |
| | If you need to use a different controller in a derived class, set this to false.
|
| |
|
virtual void | reset () |
| | Clears current output.
|
| |
|
const std::vector< vec3 > & | detectedBone () const |
| |
|
const std::vector< vec3 > & | segmentedBone () const |
| |
|
float | confidenceScore () const |
| |
|
PredictionMap | computePredictionMap (const SharedImage &curImage) const |
| |
|
DetectionResult | computeDetectedBone (const SharedImage &probabilityMap) const |
| |
|
std::vector< vec3 > | computeSegmentedBone (const SharedImage &curImage, const std::vector< vec3 > &detectedBone) const |
| |
| | Algorithm () |
| | Default constructor will registers a single "compute" action that calls compute() and returns status().
|
| |
| virtual void | setProgress (Progress *progress) |
| | Sets a Progress interface the algorithm can use to notify observers about its computing progress.
|
| |
|
Progress * | progress () const |
| | Returns the progress interface if set.
|
| |
| virtual int | status () const |
| | Indicates the status of the last call to compute().
|
| |
| virtual bool | survivesDataDeletion (const Data *) const |
| | Indicates whether the algorithm can handle (partial) deletion of the specified data, by default this checks whether the data is in the input list.
|
| |
| const FactoryInfo & | factoryInfo () const |
| | Returns the record describing how this Algorithm was instantiated by the AlgorithmFactory.
|
| |
|
void | setFactoryInfo (const FactoryInfo &value) |
| | Sets the record describing how this Algorithm was instantiated by the AlgorithmFactory.
|
| |
| Status | runAction (const std::string &id) |
| | Run the action with name id if it exists.
|
| |
|
const std::vector< Action > & | actions () |
| | Get a mapping from Action id to Action as registered in this algorithm.
|
| |
| 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 |
| |
|
| void | init () override |
| | Clear/resize all vectors of images/results and initialize the algorithm (e.g. load the ML model)
|
| |
|
bool | automaticDetection () |
| | Find the best slice and compute its bone detection.
|
| |
|
int | findBestSlice () |
| | Compute the probability map on a subset of slices to find the one with the highest confidence.
|
| |
|
std::shared_ptr< SharedImage > | boneProbability (int slice) |
| | Get the bone probability map in a given slice.
|
| |
|
void | computeCompoundedProbabilityImpl (UltrasoundSweep *) |
| |
|
virtual void | updatePrediction () |
| | Update prediction using current features.
|
| |
|
virtual void | detection () |
| | Run detection using ML prediction.
|
| |
|
virtual void | legacyDetection () |
| | Run legacy algorithm for bone detection.
|
| |
|
virtual void | tracking () |
| | Run tracking using last detection.
|
| |
|
void | loadDefaults () |
| |
| void | registerAction (const std::string &id, const std::string &guiName, const std::function< Algorithm::Status(void)> &action) |
| | Register an action to be run via runAction.
|
| |
|
template<typename D> |
| void | registerAction (const std::string &id, const std::string &guiName, Algorithm::Status(D::*action)(void)) |
| | Template version of runAction that can be used with a pointer to a member function.
|
| |
|
void | registerAction (const Action &action) |
| | Register an action.
|
| |
|
| enum | Status {
Unknown = -1
, Success = 0
, Error = 1
, InvalidInput
,
IncompleteInput
, OutOfMemoryHost
, OutOfMemoryGPU
, UnsupportedGPU
,
UnknownAction
, AbortedByUser
, User = 1000
} |
| | Status codes. More...
|
| |
|
Signal | signalOutputChanged |
| | Signal should be emitted by Algorithms when their output/result has changed.
|
| |
|
Signal | signalParametersChanged |
| | Signal should be emitted by Algorithms when their parameter configuration has changed.
|
| |
|
Signal | signalParametersChanged |
| | Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
|
| |
|
SharedImage * | m_curImage |
| |
|
std::unique_ptr< SharedImageSet > | m_outImages |
| |
|
std::unique_ptr< ImageResamplingAlgorithm > | m_resamplingAlgo |
| |
|
std::string | m_statsFile |
| |
|
SharedImageSet * | m_images |
| |
|
SharedImageSet * | m_labels |
| |
|
std::shared_ptr< SharedImage > | m_probabilityMap |
| | Probability map.
|
| |
|
std::vector< vec3 > | m_detectedBone |
| | Detection result.
|
| |
|
std::vector< vec3 > | m_segmentedBone |
| | Segmentation result.
|
| |
|
float | m_curConfidenceScore |
| |
|
std::vector< double > | m_curBoneClassification |
| |
|
bool | m_useLegacyAlgorithm |
| | Use previous algorithm.
|
| |
|
double | m_workingResolution |
| | Spacing for the working images.
|
| |
|
int | m_frameStep |
| | Step between predicted frames.
|
| |
|
int | m_nbSplinePoints |
| | Number of control points in the final spline.
|
| |
|
std::string | m_predictionModelPath |
| |
|
std::unique_ptr< ML::MachineLearningModel > | m_predictionModel |
| |
|
float | m_detectionProbabilityThreshold |
| | Threshold on random forest probability for detection heuristic.
|
| |
|
float | m_detectionDepthPenalization |
| |
|
double | m_marginAroundDetection |
| | Margin around detection for the mask in mm.
|
| |
|
double | m_maskSmoothingScale |
| | Scale for the laplacian in mm.
|
| |
|
double | m_marginAroundPrevious |
| | Margin around previous segmentation for the mask in mm.
|
| |
|
float | m_segmentationThreshold |
| | Threshold for segmentation extraction.
|
| |
|
float | m_segmentationGradientFactor |
| |
|
double | m_segmentationOffset |
| |
|
int | m_segmentationSmoothHalfSize |
| |
|
float | m_removeSidePercent |
| | Total percent of the points to be removed from the sides of each bone (0 1)
|
| |
|
double | m_qualityThreshold |
| | Frames having lower tracking quality than this threshold are ignored.
|
| |
|
bool | m_medianQualityThreshold |
| | If true, median tracking quality of all frames is used as the threshold.
|
| |
|
std::string | m_name |
| | Algorithm name.
|
| |
|
Progress * | m_progress = nullptr |
| | Non-owing pointer to a progress interface. May be a nullptr.
|
| |
|
FactoryInfo | m_factoryInfo = {} |
| | Record describing how this algorithm was instantiated by the AlgorithmFactory.
|
| |
|
int | m_status = Status::Unknown |
| | Algorithm status after last call to compute()
|
| |
|
std::vector< Action > | m_actions |
| | Map of key given by the id of the action, of the available actions of this algorithm.
|
| |
|
std::vector< Param > | m_params |
| | List of all registered Parameter and SubProperty instances.
|
| |