Seg3D
2.4
Seg3D is a free volume segmentation and processing tool developed by the NIH Center for Integrative Biomedical Computing at the University of Utah Scientific Computing and Imaging (SCI) Institute.
|
Public Member Functions | |
virtual void | raise_abort () override |
virtual bool | check_abort () override |
void | raise_stop () |
bool | check_stop () |
virtual void | abort_and_wait () override |
void | connect_abort (const LayerHandle &layer) |
void | connect_stop (const LayerHandle &layer) |
Core::NotifierHandle | get_notifier () |
bool | find_layer (const std::string &layer_id, LayerHandle &layer) |
bool | lock_for_use (LayerHandle layer) |
bool | lock_for_processing (LayerHandle layer) |
bool | lock_for_deletion (LayerHandle layer) |
bool | create_and_lock_data_layer_from_layer (LayerHandle src_layer, LayerHandle &dst_layer) |
bool | create_and_lock_data_layer (const Core::GridTransform &grid_trans, LayerHandle src_layer, LayerHandle &dst_layer) |
bool | create_cropped_large_volume_layer (const Core::GridTransform &crop_trans, LayerHandle src_layer, LayerHandle &dst_layer) |
bool | create_and_lock_mask_layer_from_layer (LayerHandle src_layer, LayerHandle &dst_layer) |
bool | create_and_lock_mask_layer_from_layer (LayerHandle src_layer, LayerHandle &dst_layer, std::string dst_name) |
bool | create_and_lock_mask_layer (const Core::GridTransform &grid_trans, LayerHandle src_layer, LayerHandle &dst_layer) |
bool | dispatch_unlock_layer (LayerHandle layer) |
bool | dispatch_delete_layer (LayerHandle layer) |
bool | dispatch_insert_data_volume_into_layer (LayerHandle layer, Core::DataVolumeHandle data, bool update_histogram) |
bool | dispatch_insert_mask_volume_into_layer (LayerHandle layer, Core::MaskVolumeHandle mask) |
void | create_undo_redo_and_provenance_record (Core::ActionContextHandle context, Core::ActionHandle action, bool split_prov=false) |
bool | update_provenance_action_string (Core::ActionHandle action) |
void | set_sandbox (SandboxID sandbox) |
SandboxID | get_sandbox () |
virtual std::string | get_filter_name () const =0 |
virtual std::string | get_layer_prefix () const =0 |
void | report_error (const std::string &error) |
Layer::filter_key_type | get_key () const |
Protected Member Functions | |
virtual void | handle_abort () |
virtual void | handle_stop () |
virtual void | run_filter ()=0 |
virtual void | run () |
Friends | |
class | LayerFilterPrivate |
Additional Inherited Members | |
Static Public Member Functions inherited from Core::Runnable | |
static void | Start (RunnableHandle runnable) |
|
overridevirtual |
ABORT_AND_WAIT: NOTE: When undoing asynchronous layer operations, one may need to wait until the filter can be aborted. If not the state of the program is unclear. Hence this function will ensure that the filter has finished processing and that all locks are cleared. NOTE: This function should be run on the application thread only
Implements Seg3D::LayerAbstractFilter.
|
overridevirtual |
CHECK_ABORT: Check the abort flag
Implements Seg3D::LayerAbstractFilter.
Reimplemented in Seg3D::PointSetFilterAlgo.
bool LayerFilter::check_stop | ( | ) |
CHECK_STOP: Check the stop flag
void LayerFilter::connect_abort | ( | const LayerHandle & | layer | ) |
CONNECT_ABORT: Monitor the abort flag of a layer
void LayerFilter::connect_stop | ( | const LayerHandle & | layer | ) |
CONNECT_STOP: Monitor the stop flag of a layer
bool LayerFilter::create_and_lock_data_layer | ( | const Core::GridTransform & | grid_trans, |
LayerHandle | src_layer, | ||
LayerHandle & | dst_layer | ||
) |
CREATE_AND_LOCK_DATA_LAYER: Create a new data layer with the given grid transform, the layer is immediately locked as it does not contain any data and will be in the creating state. NOTE: This function can only be run from the application thread
bool LayerFilter::create_and_lock_data_layer_from_layer | ( | LayerHandle | src_layer, |
LayerHandle & | dst_layer | ||
) |
CREATE_AND_LOCK_DATA_LAYER_FROM_LAYER: Create a new data layer with the same dimensions as another layer, the layer is immediately locked as it does not contain any data and will be in the creating state. NOTE: This function can only be run from the application thread
bool LayerFilter::create_and_lock_mask_layer | ( | const Core::GridTransform & | grid_trans, |
LayerHandle | src_layer, | ||
LayerHandle & | dst_layer | ||
) |
CREATE_AND_LOCK_MASK_LAYER: Create a new mask layer with the given grid transform, the layer is immediately locked as it does not contain any data and will be in the creating state. NOTE: This function can only be run from the application thread
bool LayerFilter::create_and_lock_mask_layer_from_layer | ( | LayerHandle | src_layer, |
LayerHandle & | dst_layer | ||
) |
CREATE_AND_LOCK_MASK_LAYER_FROM_LAYER: Create a new mask layer with the same dimensions as another layer, the layer is immediately locked as it does not contain any data and will be in the creating state. NOTE: This function can only be run from the application thread.
bool LayerFilter::create_and_lock_mask_layer_from_layer | ( | LayerHandle | src_layer, |
LayerHandle & | dst_layer, | ||
std::string | dst_name | ||
) |
CREATE_AND_LOCK_MASK_LAYER_FROM_LAYER: Create a new mask layer with the same dimensions as another layer, the layer is immediately locked as it does not contain any data and will be in the creating state. This one can use specified name instead of src_layer name NOTE: This function can only be run from the application thread.
bool LayerFilter::create_cropped_large_volume_layer | ( | const Core::GridTransform & | crop_trans, |
LayerHandle | src_layer, | ||
LayerHandle & | dst_layer | ||
) |
CREATE_CROPPED_LARGE_VOLUME_LAYER: Create a cropped version of the soure large volume layer. NOTE: This function can only be run from the application thread
void LayerFilter::create_undo_redo_and_provenance_record | ( | Core::ActionContextHandle | context, |
Core::ActionHandle | action, | ||
bool | split_prov = false |
||
) |
CREATE_UNDO_REDO_AND_RPOVENANCE_RECORD: Create a provenance record and add it to the provenance database, and an undo record and add it to the undo stack.
bool LayerFilter::dispatch_delete_layer | ( | LayerHandle | layer | ) |
DISPATCH_DELETE_LAYER: Schedule a layer to be deleted
bool LayerFilter::dispatch_insert_data_volume_into_layer | ( | LayerHandle | layer, |
Core::DataVolumeHandle | data, | ||
bool | update_histogram | ||
) |
DISPATCH_INSERT_DATA_VOLUME_INTO_LAYER: Schedule a new data volume to be inserted into a layer
bool LayerFilter::dispatch_insert_mask_volume_into_layer | ( | LayerHandle | layer, |
Core::MaskVolumeHandle | mask | ||
) |
DISPATCH_INSERT_MASK_VOLUME_INTO_LAYER: Schedule a new mask volume to be inserted into a layer
bool LayerFilter::dispatch_unlock_layer | ( | LayerHandle | layer | ) |
DISPATCH_UNLOCK_LAYER: Schedule a layer to be unlocked.
bool LayerFilter::find_layer | ( | const std::string & | layer_id, |
LayerHandle & | layer | ||
) |
FIND_LAYER: Find a layer in the layer manager with this id
|
pure virtual |
GET_FILTER_NAME: This functions returns the name of the filter that is used in the error report.
Implemented in Seg3D::DilateErodeFilterAlgo, Seg3D::IntensityCorrectionFilterAlgo, Seg3D::PointSetFilterAlgo, Seg3D::IterativeDilateErodeFilterAlgo, Seg3D::ConnectedComponentFilterAlgo, Seg3D::ErodeFilterAlgo, Seg3D::DilateFilterAlgo, Seg3D::FillHolesFilterAlgo, Seg3D::IterativeErodeFilterAlgo, Seg3D::IterativeDilateFilterAlgo, Seg3D::ActionSpeedlineAlgo, Seg3D::SmoothDilateErodeFilterAlgo, Seg3D::NeighborhoodConnectedFilterAlgo, Seg3D::MaskDataFilterAlgo, Seg3D::ThresholdSegmentationLSFilterAlgo, Seg3D::InvertFilterAlgo, Seg3D::XorFilterAlgo, Seg3D::RemoveFilterAlgo, Seg3D::AndFilterAlgo, Seg3D::OrFilterAlgo, Seg3D::SmoothErodeFilterAlgo, Seg3D::SmoothDilateFilterAlgo, Seg3D::ConnectedComponentSizeFilterAlgo, Seg3D::ConfidenceConnectedFilterAlgo, Seg3D::CurvatureAnisotropicDiffusionFilterAlgo, Seg3D::GradientAnisotropicDiffusionFilterAlgo, Seg3D::PointSetTransformAlgo, Seg3D::MeanFilterAlgo, Seg3D::MedianFilterAlgo, Seg3D::DiscreteGaussianFilterAlgo, Seg3D::OtsuThresholdFilterAlgo, Seg3D::CannyEdgeDetectionFilterAlgo, Seg3D::GradientMagnitudeFilterAlgo, Seg3D::DistanceFilterAlgo, Seg3D::HistogramEqualizationFilterAlgo, Filter::NrrdResampleFilter, Seg3D::ExtractDataLayerAlgo, Seg3D::CropAlgo, Filter::ThresholdFilter, Filter::SingleThresholdFilter, Seg3D::TransformAlgo, Seg3D::PermuteAlgo, Filter::ITKResampleFilter, Seg3D::ArithmeticFilterAlgo, and Filter::PadFilter.
Layer::filter_key_type LayerFilter::get_key | ( | ) | const |
GET_KEY: Get the unique filter key
|
pure virtual |
GET_LAYER_PREFIX: This function returns the name of the filter. The latter is prepended to the new layer name, when a new layer is generated.
Implemented in Seg3D::DilateErodeFilterAlgo, Seg3D::IntensityCorrectionFilterAlgo, Seg3D::PointSetFilterAlgo, Seg3D::IterativeDilateErodeFilterAlgo, Seg3D::ConnectedComponentFilterAlgo, Seg3D::ErodeFilterAlgo, Seg3D::DilateFilterAlgo, Seg3D::FillHolesFilterAlgo, Seg3D::IterativeErodeFilterAlgo, Seg3D::IterativeDilateFilterAlgo, Seg3D::ActionSpeedlineAlgo, Seg3D::SmoothDilateErodeFilterAlgo, Seg3D::NeighborhoodConnectedFilterAlgo, Seg3D::MaskDataFilterAlgo, Seg3D::ThresholdSegmentationLSFilterAlgo, Seg3D::InvertFilterAlgo, Seg3D::XorFilterAlgo, Seg3D::RemoveFilterAlgo, Seg3D::AndFilterAlgo, Seg3D::OrFilterAlgo, Seg3D::SmoothErodeFilterAlgo, Seg3D::SmoothDilateFilterAlgo, Seg3D::ConnectedComponentSizeFilterAlgo, Seg3D::ConfidenceConnectedFilterAlgo, Seg3D::CurvatureAnisotropicDiffusionFilterAlgo, Seg3D::GradientAnisotropicDiffusionFilterAlgo, Seg3D::PointSetTransformAlgo, Seg3D::MeanFilterAlgo, Seg3D::MedianFilterAlgo, Seg3D::DiscreteGaussianFilterAlgo, Seg3D::OtsuThresholdFilterAlgo, Seg3D::CannyEdgeDetectionFilterAlgo, Seg3D::GradientMagnitudeFilterAlgo, Seg3D::DistanceFilterAlgo, Seg3D::HistogramEqualizationFilterAlgo, Filter::NrrdResampleFilter, Seg3D::ExtractDataLayerAlgo, Seg3D::CropAlgo, Filter::ThresholdFilter, Filter::SingleThresholdFilter, Seg3D::TransformAlgo, Seg3D::PermuteAlgo, Filter::ITKResampleFilter, Seg3D::ArithmeticFilterAlgo, and Filter::PadFilter.
Core::NotifierHandle LayerFilter::get_notifier | ( | ) |
GET_NOTIFIER: Return a notifier that can be used to wait for the filter to finish.
SandboxID LayerFilter::get_sandbox | ( | ) |
GET_SANDBOX: Get the sandbox in which the filter is running.
|
protectedvirtual |
HANDLE_ABORT: A virtual function that can be overloaded
Reimplemented in Seg3D::ITKFilter.
|
protectedvirtual |
HANDLE_STOP: A virtual function that can be overloaded
Reimplemented in Seg3D::ITKFilter.
bool LayerFilter::lock_for_deletion | ( | LayerHandle | layer | ) |
LOCK_FOR_DELETION: Lock a layer for processing and then for deletion, i.e. when we change the data contained in the data/mask of the layer. NOTE: This function can only be run from the application thread. NOTE: The BaseFilter class records which layers are locked and will schedule an unlock for each layer that was not unlocked by the time this class is destroyed.
bool LayerFilter::lock_for_processing | ( | LayerHandle | layer | ) |
LOCK_FOR_PROCESSING: Lock a layer for processing, i.e. when we change the data contained in the data/mask of the layer. NOTE: This function can only be run from the application thread. NOTE: The BaseFilter class records which layers are locked and will schedule an unlock for each layer that was not unlocked by the time this class is destroyed.
bool LayerFilter::lock_for_use | ( | LayerHandle | layer | ) |
LOCK_FOR_USE: Lock a layer for usage, i.e. we need the data/mask volume but we will not change the data. NOTE: This function can only be run from the application thread NOTE: The BaseFilter class records which layers are locked and will schedule an unlock for each layer that was not unlocked by the time this class is destroyed.
|
overridevirtual |
RAISE_ABORT: Raise the abort flag
Implements Seg3D::LayerAbstractFilter.
void LayerFilter::raise_stop | ( | ) |
RAISE_STOP: Raise the stop flag
void LayerFilter::report_error | ( | const std::string & | error | ) |
REPORT_ERROR: Report an error to the user
|
protectedvirtual |
RUN: The function called by runnable
Implements Core::Runnable.
|
protectedpure virtual |
RUN_FILTER: run the filter
Implemented in Seg3D::NeighborhoodConnectedFilterAlgo, Seg3D::InvertFilterAlgo, Seg3D::DilateErodeFilterAlgo, Seg3D::IterativeDilateErodeFilterAlgo, Seg3D::ExtractDataLayerAlgo, Seg3D::DilateFilterAlgo, Seg3D::ErodeFilterAlgo, Seg3D::IterativeDilateFilterAlgo, Seg3D::IterativeErodeFilterAlgo, Filter::NrrdResampleFilter, Seg3D::HistogramEqualizationFilterAlgo, Seg3D::CropAlgo, Filter::ThresholdFilter, Filter::SingleThresholdFilter, Seg3D::TransformAlgo, Seg3D::PermuteAlgo, Seg3D::ArithmeticFilterAlgo, and Filter::PadFilter.
void LayerFilter::set_sandbox | ( | SandboxID | sandbox | ) |
SET_SANDBOX: Set the sandbox in which the filter should be running.
bool LayerFilter::update_provenance_action_string | ( | Core::ActionHandle | action | ) |
UPDATE_PROVENANCE_ACTION_STRING: For filters that can be stopped at certain iterations the provenance string needs to be updated with the number of iterations. This function allows to update it