pub trait TransientAreasSegmentationModuleTrait: AlgorithmTrait + TransientAreasSegmentationModuleTraitConst {
Show 13 methods
// Required method
fn as_raw_mut_TransientAreasSegmentationModule(&mut self) -> *mut c_void;
// Provided methods
fn get_size(&mut self) -> Result<Size> { ... }
fn setup_from_file(
&mut self,
segmentation_parameter_file: &str,
apply_default_setup_on_failure: bool,
) -> Result<()> { ... }
fn setup_from_file_def(&mut self) -> Result<()> { ... }
fn setup_from_storage(
&mut self,
fs: &mut impl FileStorageTrait,
apply_default_setup_on_failure: bool,
) -> Result<()> { ... }
fn setup_from_storage_def(
&mut self,
fs: &mut impl FileStorageTrait,
) -> Result<()> { ... }
fn setup(&mut self, new_parameters: SegmentationParameters) -> Result<()> { ... }
fn get_parameters(&mut self) -> Result<SegmentationParameters> { ... }
fn print_setup(&mut self) -> Result<String> { ... }
fn run(
&mut self,
input_to_segment: &impl ToInputArray,
channel_index: i32,
) -> Result<()> { ... }
fn run_def(&mut self, input_to_segment: &impl ToInputArray) -> Result<()> { ... }
fn get_segmentation_picture(
&mut self,
transient_areas: &mut impl ToOutputArray,
) -> Result<()> { ... }
fn clear_all_buffers(&mut self) -> Result<()> { ... }
}
Expand description
Mutable methods for crate::bioinspired::TransientAreasSegmentationModule
Required Methods§
fn as_raw_mut_TransientAreasSegmentationModule(&mut self) -> *mut c_void
Provided Methods§
Sourcefn setup_from_file(
&mut self,
segmentation_parameter_file: &str,
apply_default_setup_on_failure: bool,
) -> Result<()>
fn setup_from_file( &mut self, segmentation_parameter_file: &str, apply_default_setup_on_failure: bool, ) -> Result<()>
try to open an XML segmentation parameters file to adjust current segmentation instance setup
- if the xml file does not exist, then default setup is applied
- warning, Exceptions are thrown if read XML file is not valid
§Parameters
- segmentationParameterFile: : the parameters filename
- applyDefaultSetupOnFailure: : set to true if an error must be thrown on error
§C++ default parameters
- segmentation_parameter_file: “”
- apply_default_setup_on_failure: true
Sourcefn setup_from_file_def(&mut self) -> Result<()>
fn setup_from_file_def(&mut self) -> Result<()>
try to open an XML segmentation parameters file to adjust current segmentation instance setup
- if the xml file does not exist, then default setup is applied
- warning, Exceptions are thrown if read XML file is not valid
§Parameters
- segmentationParameterFile: : the parameters filename
- applyDefaultSetupOnFailure: : set to true if an error must be thrown on error
§Note
This alternative version of TransientAreasSegmentationModuleTrait::setup_from_file function uses the following default values for its arguments:
- segmentation_parameter_file: “”
- apply_default_setup_on_failure: true
Sourcefn setup_from_storage(
&mut self,
fs: &mut impl FileStorageTrait,
apply_default_setup_on_failure: bool,
) -> Result<()>
fn setup_from_storage( &mut self, fs: &mut impl FileStorageTrait, apply_default_setup_on_failure: bool, ) -> Result<()>
try to open an XML segmentation parameters file to adjust current segmentation instance setup
- if the xml file does not exist, then default setup is applied
- warning, Exceptions are thrown if read XML file is not valid
§Parameters
- fs: : the open Filestorage which contains segmentation parameters
- applyDefaultSetupOnFailure: : set to true if an error must be thrown on error
§C++ default parameters
- apply_default_setup_on_failure: true
Sourcefn setup_from_storage_def(
&mut self,
fs: &mut impl FileStorageTrait,
) -> Result<()>
fn setup_from_storage_def( &mut self, fs: &mut impl FileStorageTrait, ) -> Result<()>
try to open an XML segmentation parameters file to adjust current segmentation instance setup
- if the xml file does not exist, then default setup is applied
- warning, Exceptions are thrown if read XML file is not valid
§Parameters
- fs: : the open Filestorage which contains segmentation parameters
- applyDefaultSetupOnFailure: : set to true if an error must be thrown on error
§Note
This alternative version of TransientAreasSegmentationModuleTrait::setup_from_storage function uses the following default values for its arguments:
- apply_default_setup_on_failure: true
Sourcefn setup(&mut self, new_parameters: SegmentationParameters) -> Result<()>
fn setup(&mut self, new_parameters: SegmentationParameters) -> Result<()>
try to open an XML segmentation parameters file to adjust current segmentation instance setup
- if the xml file does not exist, then default setup is applied
- warning, Exceptions are thrown if read XML file is not valid
§Parameters
- newParameters: : a parameters structures updated with the new target configuration
Sourcefn get_parameters(&mut self) -> Result<SegmentationParameters>
fn get_parameters(&mut self) -> Result<SegmentationParameters>
return the current parameters setup
Sourcefn print_setup(&mut self) -> Result<String>
fn print_setup(&mut self) -> Result<String>
Sourcefn run_def(&mut self, input_to_segment: &impl ToInputArray) -> Result<()>
fn run_def(&mut self, input_to_segment: &impl ToInputArray) -> Result<()>
main processing method, get result using methods getSegmentationPicture()
§Parameters
- inputToSegment: : the image to process, it must match the instance buffer size !
- channelIndex: : the channel to process in case of multichannel images
§Note
This alternative version of TransientAreasSegmentationModuleTrait::run function uses the following default values for its arguments:
- channel_index: 0
Sourcefn get_segmentation_picture(
&mut self,
transient_areas: &mut impl ToOutputArray,
) -> Result<()>
fn get_segmentation_picture( &mut self, transient_areas: &mut impl ToOutputArray, ) -> Result<()>
access function return the last segmentation result: a boolean picture which is resampled between 0 and 255 for a display purpose
Sourcefn clear_all_buffers(&mut self) -> Result<()>
fn clear_all_buffers(&mut self) -> Result<()>
cleans all the buffers of the instance
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.