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.
See related example
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.
See related example
Syntax
Method | Description |
---|---|
static AnalysisMsr read( const std::string& pathName ) | Reads an AnalysisMsr object from a file name. |
void write( const std::string& pathName ) | Writes an AnalysisMsr object to a file name. |
static const MsrInfo* getMeasurementInfoFromName( const std::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. |
std::shared_ptr< Measurement> select( const 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. |
std::shared_ptr< Measurement> get( const 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 bool exists( const std::string& name ) | Checks if a measurement exists. Returns true if a native measurement with the given name exists or if a custom measurement has been registered. |
static const CustomMeasurementInfo* registerCustomMeasurement( const std::string& name, const std::string& formula, const std::string& description, const imagedev::PhysicalInformation physicalInformation ) | Adds a custom measurement to the current ImageDev instance. This custom measurement is defined by a name, a formula, a description and a physical information. 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. |
static void unregisterCustomMeasurement( const std::string& name ) | Removes a custom measurement from the current ImageDev instance. The custom measurement with the name passed as an argument of the method is removed from the current ImageDev instance. |
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() -> iolink.DataFrameView | 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. |
exists(name) | Checks if a measurement exists. Returns true if a native measurement with the given name exists or if a custom measurement has been registered. |
register_custom_measurement( name, formula, description, physicalInformation ) -> CustomMeasurementInfo | Adds a custom measurement to the current ImageDev instance. This custom measurement is defined by a name, a formula, a description and a physical information. 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. |
unregister_custom_measurement(name) | Removes a custom measurement from the current ImageDev instance. The custom measurement with the name passed as an argument of the method is removed from the current ImageDev instance. |
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. |
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 bool Exists(String name) | Checks if a measurement exists. Returns true if a native measurement with the given name exists or if a custom measurement has been registered. |
static CustomMeasurementInfo RegisterCustomMeasurement(String name, String formula, String description, Data.PhysicalInformation info ) | Adds a custom measurement to the current ImageDev instance. This custom measurement is defined by a name, a formula, a description and a physical information. 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. |
static void UnregisterCustomMeasurement(String name) | Removes a custom measurement from the current ImageDev instance. The custom measurement with the name passed as an argument of the method is removed from the current ImageDev instance. |
© 2025 Thermo Fisher Scientific Inc. All rights reserved.