AnalysisMsr
Defines the measurements to compute in analysis algorithms and gives access to their results.
The analysis algorithms using this object are listed here.
Some native measurements are already available. The NativeMeasurements object gives quick access to their MsrInfo.
In addition to native measurements, an API to generate user-defined measurements is available. The registerCustomMeasurement static method adds a custom measurement to the current instance.
The analysis algorithms using this object are listed here.
Some native measurements are already available. The NativeMeasurements object gives quick access to their MsrInfo.
In addition to native measurements, an API to generate user-defined measurements is available. The registerCustomMeasurement static method adds a custom measurement to the current instance.
Syntax
Method | Description |
---|---|
static AnalysisMsr read( const String& pathName ) | Reads an AnalysisMsr object from a file name. |
void write( const String& pathName ) | Writes an AnalysisMsr object to a file name. |
static MsrInfo getMeasurementInfoFromName( const String& name ) | Gets the information of a measurement from its name. The MsrInfo object contains the name and the physical dimension of the measurement. |
std::shared_ptr<iolink::DataFrameView> toDataFrame() | Convert the analysis into an iolink DataFrame. Convert the analysis into an iolink DataFrame. |
Measurement select( MsrInfo* info ) | Selects a specific measurement to be computed by an image analysis processing algorithm. The type of the measurement returned by this method depends on the type of the given MsrInfo object. For instance, adding an Area2dInfo object returns the related Area2d measurement object generated. |
void select( std::vector< MsrInfo*> infos ) | Selects a list of measurements to be computed by an image analysis processing algorithm. |
Measurement get( MsrInfo info ) | Returns the measurement corresponding to the given MsrInfo object. For instance, getting an Area2dInfo object returns the Area2d measurement object. |
uint64_t labelCount() | Returns the number of label. |
static CustomMeasurementInfo* registerCustomMeasurement( const std::string& name, const std::string& formula, const std::string& description ) | Adds a custom measurement to the current instance. This custom measurement is defined by a name, a formula and a description. The formula is a combination of native measurement and the syntax can be checked using the checkMeasurementFormula utility. A CustomMeasurementInfo is returned for further use. |
Method | Description |
---|---|
read(pathname) | Reads an AnalysisMsr object from a file name. |
write(self, pathname) | Writes an AnalysisMsr object to a file name. |
msr_from_name(name) | Gets the information of a measurement from its name. The MsrInfo object contains the name and the physical dimension of the measurement. |
to_data_frame() | Convert the analysis into an iolink DataFrame. Convert the analysis into an iolink DataFrame. |
select(self, msr) | Selects a specific measurement to be computed by an image analysis processing algorithm. The type of the measurement returned by this method depends on the type of the given MsrInfo object. For instance, adding an Area2dInfo object returns the related Area2d measurement object generated. |
select(self, infos) | Selects a list of measurements to be computed by an image analysis processing algorithm. |
get(self, info) | Returns the measurement corresponding to the given MsrInfo object. For instance, getting an Area2dInfo object returns the Area2d measurement object. |
label_count(self) | Returns the number of label. |
register_custom_measurement( name, formula, description ) | Adds a custom measurement to the current instance. This custom measurement is defined by a name, a formula and a description. The formula is a combination of native measurement and the syntax can be checked using the checkMeasurementFormula utility. A CustomMeasurementInfo is returned for further use. |
Method | Description |
---|---|
static AnalysisMsr Read(String pathName) | Reads an AnalysisMsr object from a file name. |
void Write(String pathName) | Writes an AnalysisMsr object to a file name. |
static MsrInfo GetMeasurementInfoFromName(String name) | Gets the information of a measurement from its name. The MsrInfo object contains the name and the physical dimension of the measurement. |
IoLink.DataFrameView ToDataFrame() | Convert the analysis into an iolink DataFrame. Convert the analysis into an iolink DataFrame. |
Measurement Select(MsrInfo info) | Selects a specific measurement to be computed by an image analysis processing algorithm. The type of the measurement returned by this method depends on the type of the given MsrInfo object. For instance, adding an Area2dInfo object returns the related Area2d measurement object generated. |
void Select(MsrInfo[] infos) | Selects a list of measurements to be computed by an image analysis processing algorithm. |
Measurement Get(MsrInfo info) | Returns the measurement corresponding to the given MsrInfo object. For instance, getting an Area2dInfo object returns the Area2d measurement object. |
int LabelCount() | Returns the number of label. |
static RegisterCustomMeasurement(String name, String formula, String description ) | Adds a custom measurement to the current instance. This custom measurement is defined by a name, a formula and a description. The formula is a combination of native measurement and the syntax can be checked using the checkMeasurementFormula utility. A CustomMeasurementInfo is returned for further use. |