FilterAnalysis
Filters objects from an analysis object.
Access to parameter description
For an introduction:
The input filter contains the criteria to preserve objects from the input label image. These criteria are defined by one or several analysis measurements ranges.
If the label image used to generate the input analysis had a coordinate system unit defined in its calibration property, the filter limit values and analysis results are expressed in this coordinate system unit.
See also
Access to parameter description
For an introduction:
- section Image Analysis
- section Label Filtering
The input filter contains the criteria to preserve objects from the input label image. These criteria are defined by one or several analysis measurements ranges.
If the label image used to generate the input analysis had a coordinate system unit defined in its calibration property, the filter limit values and analysis results are expressed in this coordinate system unit.
See also
Function Syntax
This function returns outputAnalysis.
// Function prototype
AnalysisMsr::Ptr filterAnalysis( AnalysisMsr::Ptr inputAnalysis, std::string inputFilter, AnalysisMsr::Ptr outputAnalysis = NULL );
This function returns outputAnalysis.
// Function prototype. filter_analysis( input_analysis = None, input_filter = "", output_analysis = None )
This function returns outputAnalysis.
// Function prototype. public static AnalysisMsr FilterAnalysis( AnalysisMsr inputAnalysis = null, string inputFilter = "", AnalysisMsr outputAnalysis = null );
Class Syntax
Parameters
Class Name | FilterAnalysis |
---|
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
inputAnalysis |
The input analysis. | AnalysisMsr | nullptr | ||
inputFilter |
The input filter formula.
The Label Filtering section details how to create a filter. |
Filter | "" | ||
outputAnalysis |
The output analysis. | AnalysisMsr | nullptr |
Object Examples
AnalysisMsr::Ptr analysis_filled= AnalysisMsr::read( std::string( IMAGEDEVDATA_OBJECTS_FOLDER ) + "analysis_filled.vip" ); FilterAnalysis filterAnalysisAlgo; filterAnalysisAlgo.setInputAnalysis( analysis_filled ); filterAnalysisAlgo.setInputFilter( "Area>=3000" ); filterAnalysisAlgo.execute(); std::cout << "Area2d: " << filterAnalysisAlgo.outputAnalysis()->get( NativeMeasurements::area2d )->value( 0 ) ;
analysis_filled = imagedev.AnalysisMsr.read(imagedev_data.get_object_path("analysis_filled.vip")) filter_analysis_algo = imagedev.FilterAnalysis() filter_analysis_algo.input_analysis = analysis_filled filter_analysis_algo.input_filter = "Area>=3000" filter_analysis_algo.execute() print( "Area2d: ", str( filter_analysis_algo.output_analysis.get(imagedev.native_measurements.Area2d).value( 0 ) ) )
AnalysisMsr analysis_filled = AnalysisMsr.Read( @"Data/objects/analysis_filled.vip" ); FilterAnalysis filterAnalysisAlgo = new FilterAnalysis { inputAnalysis = analysis_filled, inputFilter = "Area>=3000" }; filterAnalysisAlgo.Execute(); Console.WriteLine( "Area2d: " + filterAnalysisAlgo.outputAnalysis.Get( NativeMeasurements.Area2d ).Value( 0 ) );
Function Examples
AnalysisMsr::Ptr analysis_filled= AnalysisMsr::read( std::string( IMAGEDEVDATA_OBJECTS_FOLDER ) + "analysis_filled.vip" ); auto result = filterAnalysis( analysis_filled, "Area>=3000" ); std::cout << "Area2d: " << result->get( NativeMeasurements::area2d )->value( 0 ) ;
analysis_filled = imagedev.AnalysisMsr.read(imagedev_data.get_object_path("analysis_filled.vip")) result = imagedev.filter_analysis( analysis_filled, "Area>=3000" ) print( "Area2d: ", str( result.get(imagedev.native_measurements.Area2d).value( 0 ) ) )
AnalysisMsr analysis_filled = AnalysisMsr.Read( @"Data/objects/analysis_filled.vip" ); AnalysisMsr result = Processing.FilterAnalysis( analysis_filled, "Area>=3000" ); Console.WriteLine( "Area2d: " + result.Get( NativeMeasurements.Area2d ).Value( 0 ) );