Access to Error Metric during VMTK Level Set Evolution in Python

Hi all,

I have implemented the vmtkLevelSetSegmentation module in Python for my segmentation tasks using VMTK. During the evolution of level sets, I am interested in accessing the error metric (such as RMS error) to monitor convergence directly within my Python script.

Currently, the segmentation stops based on self.MaximumRMSError, which sets the maximum allowable RMS error. (or when self.NumberOfIterations is reached) However, I would like to retrieve this error metric programmatically during the evolution process to monitor convergence more closely.
I understand that self.PrintProgress captures progress as a percentage via a "ProgressEvent". However, this does not provide insight into the specific error between iterations.

Could someone please provide the method to access the error metric (RMS error or similar) during level set evolution in Python? Alternatively, a feature enhancement for this capability would greatly assist in monitoring convergence and optimizing parameters.

So for example:
levelSets = vmtk.vmtkLevelSetSegmentation()
currentRmsError = levelSets.GetCurrentRMSError()

Thank you.