Region Heterogeneity is the percentage of pixels in a region for which the monochrome intensity differs by more than +/- IntensityRange (a percentage of full intensity range for the image's pixel type) from the the mean intensity (Intensity, Mean measurement). The IntensityRange default value is 10% of the image RangeMax-RangeMin. Unfortunately, this parameter is not currently exposed in the user-interface. And so far I haven't been able to think up a practical way for a user to change it, but I'll post a solution if I come up with some way to do it.
Here's a macro that will update the Heterogeneity measurement with a new IntensityRange:
Public Sub SetIntensityRange()<br> Dim imgA As McImage = ThisApplication.ActiveImage<br> Dim mmData As MediaCy.Addins.Measurements.McMMData = imgA.MeasurementsData<br> If ( mmData Is Nothing OrElse mmData.Count = 0 ) Then Exit Sub<br> Dim mcregionsMeas As MediaCy.IQL.Features.McRegions = mmData.SubFeature(0).GetFeatures<br> If (mcregionsMeas Is Nothing) Then Exit Sub<br> Dim hetMeas As MediaCy.IQL.Features.IMcHeterogeneity = mcregionsMeas.mRgnHeterogeneity<br> Dim nIRng As Integer = CInt(hetMeas.IntensityRange)<br> Dim nIRngNew As Integer = InputBox("New Heterogeneity Intensity Range (%): ", "Hetrogeneity Range", CStr(nIRng))<br> hetMeas.IntensityRange = CDbl(nIRngNew)<br> mmData.ShowMeasurements(MediaCy.Addins.Measurements.McMeasurements.enumShowMeasFlags.smfShowAll) 'update results display<br>End Sub 'SetIntensityRange
You will need a reference to Extensibility and MediaCy.Addins.Measurements in your macro references.
Unfortunately, the new IntensityRange will not persist when a new Count is done, so this is only useful for exploring how the parameter affects the measurement result.
Answers
You will need a reference to Extensibility and MediaCy.Addins.Measurements in your macro references.
Unfortunately, the new IntensityRange will not persist when a new Count is done, so this is only useful for exploring how the parameter affects the measurement result.