Filter objects by measurement: radial distribution


#1

Hallo,
as I stated in the header, I would like to filter my identified objects by a radial distribution of intensity. Therefore I measure Radial distribution and refer to that using the same parameters in Filter by Object Measurement.
I get the following error:

There was a problem running the analysis module FilterByObjectMeasurement which is number 19.
Attempted to access FieldnumsCategory(3); index out of bounds because numel(FieldnumsCategory)=0. Image processing was canceled in the FilterByObjectMeasurement module (#19) because an error ocurred when retrieving the data. Likely the category of measurement you chose, RadialDistribution, was not available for FC with feature 3, possibly specific to image ‘CmitoMCH’ and/or Texture Scale = 4.

Stack:
FilterByObjectMeasurement in /Applications/CompiledCellProfiler/CellProfiler_mcr/Modules/FilterByObjectMeasurement.m (123)
AnalyzeImagesButton_Callback in /Applications/CompiledCellProfiler/CellProfiler_mcr/CellProfiler/CellProfiler.m (10424)
gui_mainfcn in /Applications/CompiledCellProfiler/CellProfiler_mcr/CellProfiler/CellProfiler.m (12164)
CellProfiler in /Applications/CompiledCellProfiler/CellProfiler_mcr/CellProfiler/CellProfiler.m (57)

I would like to filter by feature 3:

Features measured: Feature Number:
FracAtD | 1
MeanFrac | 2
RadialCV | 3

Any ideas what might be wrong?

Best, Dani


#2

Hi Dani,

You found a bug :frowning: MeasureRadialDistribution was adding its measurements under the category ‘RadialIntensityDist’ while the subfunction called by FilterByObjMeasurement was looking for it in the category “RadialDistribution” (which is what it should be, logically). If you have the developer’s version, you can fix this yourself by changing three lines of code in MeasureRadialDistribution.

%%% Store Measurements
for k = 1:BinCount,
handles = CPaddmeasurements(handles, MainObjects, CPjoinstrings(‘RadialIntensityDist’, ‘FracAtD’, ImageName, num2str(k)), FractionAtDistance(:, k));
handles = CPaddmeasurements(handles, MainObjects, CPjoinstrings(‘RadialIntensityDist’, ‘MeanFrac’, ImageName, num2str(k)), MeanPixelFraction(:, k));
handles = CPaddmeasurements(handles, MainObjects, CPjoinstrings(‘RadialIntensityDist’, ‘RadialCV’, ImageName, num2str(k)), RadialCV(:, k));
end

should be
%%% Store Measurements
for k = 1:BinCount,
handles = CPaddmeasurements(handles, MainObjects, CPjoinstrings(‘RadialDistribution’, ‘FracAtD’, ImageName, num2str(k)), FractionAtDistance(:, k));
handles = CPaddmeasurements(handles, MainObjects, CPjoinstrings(‘RadialDistribution’, ‘MeanFrac’, ImageName, num2str(k)), MeanPixelFraction(:, k));
handles = CPaddmeasurements(handles, MainObjects, CPjoinstrings(‘RadialDistribution’, ‘RadialCV’, ImageName, num2str(k)), RadialCV(:, k));
end

~kate