Measure Texture Error after Filter using Rules

Hi,

I have measured primary objects, then sorted them (in an attempt to get more accurate ID) in Analyst. I then added a step to filter the primary objects according to these rules. Since the new, filtered objects are the ones I want measurements on, I re-measured everything after the filter step. I keep getting a texture error (on the second measure texture module, I believe) which says:

Traceback (most recent call last):
File “cellprofiler\pipeline.pyc”, line 309, in run
File “cellprofiler\modules\measuretexture.pyc”, line 376, in run
File “cellprofiler\modules\measuretexture.pyc”, line 461, in run_image
File “cellprofiler\modules\measuretexture.pyc”, line 564, in record_image_measurement
File “cellprofiler\measurements.pyc”, line 258, in add_image_measurement
File “cellprofiler\measurements.pyc”, line 315, in add_measurement
AssertionError: Feature Image.Texture_AngularSecondMoment_OrigDAPI_3 has already been set for this image cycle

I have tried many things, but cannot understand why this error occurs. When I click “skip image, continue pipeline” everything runs fine until the same error occurs on the next image set.

Have I misunderstood the measurement modules or is there a way to avoid this error while still getting texture measurements on my filtered objects?

Thank you!

Could you post your pipeline as an attachment so we could take a look?
-Mark

Yes - my pipeline is attached. Thanks.
AllAbs_DAPI.cp (13.1 KB)

Here is one of my images in case you need it - thanks!

Could you post your rules file as well. Thanks!
-Mark

I have actually worked around this problem and used other means to identify my primary objects; however, I am definitely still curious as to the cause of the error. How should I attach the rules? I am getting errors saying ‘txt’ and ‘docx’ extensions are not allowed.

You could rename the file as a .tif and upload it that way…
-Mark

Hmmm - tried that and got the error ‘It was not possible to determine the dimensions of the image’. So, I apologize that I decided to copy and paste since I don’t know the details of how file types work :frowning:

IF (whole-2_RadialDistribution_MeanFrac_OrigDAPI_2of4 > 1.21048980566, -0.45901636654159689, 0.45901636654159689], [0.48805994361415561, -0.48805994361415561])
IF (whole-2_Texture_DifferenceVariance_OrigDAPI_3 > 0.64717957207900001, [0.18180084710293817, -0.18180084710293817], -0.54851462531602635, 0.54851462531602635])
IF (whole-2_Intensity_StdIntensityEdge_OrigDAPI > 0.00053609528200900002, [0.10536404423713804, -0.10536404423713804], -0.76653194415378245, 0.76653194415378245])
IF (whole-2_Intensity_MaxIntensity_OrigDAPI > 0.040894199999999999, -0.74017987778310523, 0.74017987778310523], [0.065817930830539065, -0.065817930830539065])
IF (whole-2_Texture_SumEntropy_OrigDAPI_3 > 2.2984651832199998, -0.12611589552087851, 0.12611589552087851], [0.54773671202570284, -0.54773671202570284])
IF (whole-2_AreaShape_Zernike_6_2 > 0.023689306589600001, [0.75578005493468792, -0.75578005493468792], -0.05291959898934355, 0.05291959898934355])
IF (whole-2_AreaShape_FormFactor > 0.77988691183000003, -0.25234630890926063, 0.25234630890926063], [0.17852200660004827, -0.17852200660004827])
IF (whole-2_Intensity_MinIntensityEdge_OrigDAPI > 0.0066224200000000004, -0.42204833819729165, 0.42204833819729165], [0.12812206368229609, -0.12812206368229609])
IF (whole-2_AreaShape_Zernike_5_1 > 0.0036805849014400001, -0.2149180395097858, 0.2149180395097858], [0.20471694110012806, -0.20471694110012806])
IF (whole-2_AreaShape_Zernike_6_4 > 0.00490661906692, [0.24383717809123651, -0.24383717809123651], -0.2497837957907022, 0.2497837957907022])
IF (whole-2_AreaShape_Zernike_9_7 > 0.0036070470110800001, [0.19251997521034342, -0.19251997521034342], -0.24086195716769968, 0.24086195716769968])
IF (whole-2_Texture_AngularSecondMoment_OrigDAPI_3 > 0.083115946639500005, -0.29042580852664468, 0.29042580852664468], [0.13617507416102534, -0.13617507416102534])
IF (whole-2_AreaShape_Zernike_2_0 > 0.167458267405, [0.10624992117673294, -0.10624992117673294], -0.33763774987334905, 0.33763774987334905])
IF (whole-2_RadialDistribution_MeanFrac_OrigDAPI_2of4 > 1.0897645739899999, -0.071028631960224839, 0.071028631960224839], [0.77815301969617512, -0.77815301969617512])
IF (whole-2_RadialDistribution_RadialCV_OrigDAPI_1of4 > 0.036420061220200001, -0.43756868656397746, 0.43756868656397746], [0.097648188586727483, -0.097648188586727483])
IF (whole-2_Intensity_UpperQuartileIntensity_OrigDAPI > 0.023422598838800001, -0.50935629170340335, 0.50935629170340335], [0.071526531581831129, -0.071526531581831129])
IF (whole-2_AreaShape_Zernike_7_1 > 0.0021613065315199999, -0.086047424370591513, 0.086047424370591513], [0.39513586980879628, -0.39513586980879628])
IF (whole-2_AreaShape_Zernike_7_7 > 0.00092318739802400005, [0.08569457109993954, -0.08569457109993954], -0.4315514042185874, 0.4315514042185874])
IF (whole-2_AreaShape_Zernike_9_9 > 0.0066419793742199997, [0.8585738402327272, -0.8585738402327272], -0.037478325035762393, 0.037478325035762393])
IF (whole-2_Texture_SumAverage_OrigDAPI_3 > 9.3736089030199992, -0.57491194453686834, 0.57491194453686834], [0.063610324101275081, -0.063610324101275081])
IF (whole-2_Texture_Correlation_OrigDAPI_3 > 0.650547323761, -0.057330969069806066, 0.057330969069806066], [0.56928659218734756, -0.56928659218734756])
IF (whole-2_AreaShape_Orientation > 55.821664992899997, -0.37999422772262192, 0.37999422772262192], [0.080543665642094669, -0.080543665642094669])
IF (whole-2_Intensity_MinIntensityEdge_OrigDAPI > 0.0066834499999999996, -0.4853953709958721, 0.4853953709958721], [0.063450881732673672, -0.063450881732673672])
IF (whole-2_AreaShape_Solidity > 0.97238372093000003, -0.48956215997792646, 0.48956215997792646], [0.068029432785242261, -0.068029432785242261])
IF (whole-2_Number_Object_Number > 55.0, -0.50284576100840273, 0.50284576100840273], [0.059913382926803954, -0.059913382926803954])
IF (whole-2_Texture_Variance_OrigDAPI_3 > 2.49080052472, [0.15091597844711455, -0.15091597844711455], -0.18596717966768225, 0.18596717966768225])
IF (whole-2_Texture_Correlation_OrigDAPI_3 > 0.79734265475800004, -0.45365288239805884, 0.45365288239805884], [0.090353001545421918, -0.090353001545421918])
IF (whole-2_Texture_DifferenceVariance_OrigDAPI_3 > 0.89322868078700002, -0.52521300327335052, 0.52521300327335052], [0.056342464725080241, -0.056342464725080241])
IF (whole-2_Location_Center_X > 1231.4556700999999, -0.54044733484365715, 0.54044733484365715], [0.052888301842939384, -0.052888301842939384])
IF (whole-2_AreaShape_Zernike_7_7 > 0.0033405848489299998, [0.30806913533142782, -0.30806913533142782], -0.10805181349680301, 0.10805181349680301])
IF (whole-2_AreaShape_Zernike_3_1 > 0.0021364008956700001, -0.036287783546186628, 0.036287783546186628], [0.69795288635138752, -0.69795288635138752])
IF (whole-2_RadialDistribution_FracAtD_OrigDAPI_3of4 > 0.41680099999999998, -1.000000000000008, 1.000000000000008], [0.0326662714282, -0.0326662714282])
IF (whole-2_AreaShape_Zernike_8_8 > 0.0083467684077400007, -0.76090558645205419, 0.76090558645205419], [0.025795928739383842, -0.025795928739383842])
IF (whole-2_Texture_SumAverage_OrigDAPI_3 > 7.3828197945799996, -0.08590979485130755, 0.08590979485130755], [0.43227076376128781, -0.43227076376128781])
IF (whole-2_Intensity_MeanIntensity_OrigDAPI > 0.011726913891600001, [0.08585668917705766, -0.08585668917705766], -0.36760722502529558, 0.36760722502529558])
IF (whole-2_Intensity_IntegratedIntensity_OrigDAPI > 23.401877024699999, -0.19538973770572712, 0.19538973770572712], [0.2016203939005359, -0.2016203939005359])
IF (whole-2_AreaShape_Zernike_6_2 > 0.00878702067648, -0.057107494048657392, 0.057107494048657392], [0.50061514418125763, -0.50061514418125763])
IF (whole-2_AreaShape_Zernike_6_2 > 0.023461255858300001, [0.64401914123865589, -0.64401914123865589], -0.041313755352632965, 0.041313755352632965])
IF (whole-2_RadialDistribution_FracAtD_OrigDAPI_1of4 > 0.060529800000000002, -0.68979383238556258, 0.68979383238556258], [0.047030140566695432, -0.047030140566695432])
IF (whole-2_Texture_Gabor_OrigDAPI_3 > 0.45828002055900002, [0.039062955240358681, -0.039062955240358681], -0.63619830299264613, 0.63619830299264613])
IF (whole-2_Intensity_StdIntensityEdge_OrigDAPI > 0.00047683531383000002, [0.026558684722785025, -0.026558684722785025], -0.8901841030682881, 0.8901841030682881])
IF (whole-2_Intensity_MassDisplacement_OrigDAPI > 0.96858443023100005, -0.16204411916995967, 0.16204411916995967], [0.181453104194088, -0.181453104194088])
IF (whole-2_Intensity_MassDisplacement_OrigDAPI > 0.41050676776799999, [0.05227135676884076, -0.05227135676884076], -0.54145914594226918, 0.54145914594226918])
IF (whole-2_RadialDistribution_RadialCV_OrigDAPI_2of4 > 0.019383245628699999, -0.056694392083728, 0.056694392083728], [0.50663776243141878, -0.50663776243141878])
IF (whole-2_Intensity_MeanIntensity_OrigDAPI > 0.0122265375204, [0.087539244156089185, -0.087539244156089185], -0.31021036717410272, 0.31021036717410272])
IF (whole-2_AreaShape_Zernike_7_5 > 0.0051387833555800004, -0.19179422429490531, 0.19179422429490531], [0.14846175755473792, -0.14846175755473792])
IF (whole-2_AreaShape_Zernike_8_4 > 0.0151428206201, -0.21239662330966924, 0.21239662330966924], [0.15806549399175721, -0.15806549399175721])
IF (whole-2_AreaShape_Zernike_2_0 > 0.16726757060899999, [0.08378307781279383, -0.08378307781279383], -0.32027610613218788, 0.32027610613218788])
IF (whole-2_AreaShape_MajorAxisLength > 57.388882094400003, -0.12148062606495587, 0.12148062606495587], [0.22876192064337839, -0.22876192064337839])
IF (whole-2_Intensity_MaxIntensityEdge_OrigDAPI > 0.0108644, -0.2156511321997511, 0.2156511321997511], [0.13812286883504016, -0.13812286883504016])
IF (whole-2_AreaShape_FormFactor > 0.80008332525699999, -0.43133284481735967, 0.43133284481735967], [0.090836452424980091, -0.090836452424980091])
IF (whole-2_AreaShape_Zernike_6_4 > 0.0069717151651699999, [0.24197530638907519, -0.24197530638907519], -0.14524911080831229, 0.14524911080831229])
IF (whole-2_Texture_DifferenceVariance_OrigDAPI_3 > 0.71863987977499999, [0.14018070868950747, -0.14018070868950747], -0.22024971653360789, 0.22024971653360789])
IF (whole-2_AreaShape_FormFactor > 0.74846519866399996, -0.12161722542234212, 0.12161722542234212], [0.26125966423048197, -0.26125966423048197])
IF (whole-2_Intensity_IntegratedIntensityEdge_OrigDAPI > 1.9232013663300001, -0.8542321024718853, 0.8542321024718853], [0.037197507220695182, -0.037197507220695182])
IF (whole-2_AreaShape_Solidity > 0.97489823609199999, [0.75351350801876804, -0.75351350801876804], -0.046583169253954018, 0.046583169253954018])
IF (whole-2_RadialDistribution_MeanFrac_OrigDAPI_3of4 > 1.2848599165700001, -1.0000000000000018, 1.0000000000000018], [0.034190055053233068, -0.034190055053233068])
IF (whole-2_AreaShape_Zernike_6_2 > 0.025966462821999999, [0.87759010847876995, -0.87759010847876995], -0.038947656868218418, 0.038947656868218418])
IF (whole-2_AreaShape_Zernike_9_3 > 0.0012503036330200001, -0.051965991824632157, 0.051965991824632157], [0.48151671218201514, -0.48151671218201514])
IF (whole-2_AreaShape_Zernike_9_7 > 0.0030458829262599999, [0.11271791522269718, -0.11271791522269718], -0.23751461871870941, 0.23751461871870941])
IF (whole-2_AreaShape_Zernike_6_4 > 0.0024959868794199999, -0.087680584704049436, 0.087680584704049436], [0.32659312052396655, -0.32659312052396655])
IF (whole-2_Texture_AngularSecondMoment_OrigDAPI_3 > 0.060240766317699999, [0.08250261971683126, -0.08250261971683126], -0.3212285611828346, 0.3212285611828346])
IF (whole-2_Texture_SumVariance_OrigDAPI_3 > 9.2244013614699991, [0.24072230878909037, -0.24072230878909037], -0.14199384941034909, 0.14199384941034909])
IF (whole-2_RadialDistribution_FracAtD_OrigDAPI_3of4 > 0.39487, -0.34108045156778155, 0.34108045156778155], [0.091630466035918234, -0.091630466035918234])
IF (whole-2_AreaShape_Zernike_9_1 > 0.0062567071393399998, -0.3921295701091142, 0.3921295701091142], [0.064047535552516771, -0.064047535552516771])
IF (whole-2_AreaShape_Zernike_5_5 > 0.010163263532599999, [0.44935458011480856, -0.44935458011480856], -0.061435372490289027, 0.061435372490289027])
IF (whole-2_RadialDistribution_RadialCV_OrigDAPI_2of4 > 0.025598662032400001, [0.092496164339869527, -0.092496164339869527], -0.278382252966411, 0.278382252966411])
IF (whole-2_Texture_SumEntropy_OrigDAPI_3 > 2.2984651832199998, -0.064635087650033313, 0.064635087650033313], [0.40597277973290086, -0.40597277973290086])
IF (whole-2_Texture_DifferenceEntropy_OrigDAPI_3 > 1.0010513221499999, [0.068332978488549231, -0.068332978488549231], -0.38462020909834199, 0.38462020909834199])
IF (whole-2_AreaShape_Zernike_4_2 > 0.0287770208221, -0.1056245278978561, 0.1056245278978561], [0.25002358957059467, -0.25002358957059467])
IF (whole-2_AreaShape_Zernike_4_2 > 0.0118139213575, [0.038924170279841415, -0.038924170279841415], -0.8446665213151564, 0.8446665213151564])
IF (whole-2_AreaShape_Zernike_9_1 > 0.00046412718766699999, [0.023160304336851678, -0.023160304336851678], -0.84879301392544282, 0.84879301392544282])
IF (whole-2_AreaShape_Zernike_2_2 > 0.099151512839999997, -0.077305315436812932, 0.077305315436812932], [0.33177481488650645, -0.33177481488650645])
IF (whole-2_AreaShape_Zernike_5_1 > 0.0036805849014400001, -0.18364799749492169, 0.18364799749492169], [0.17858654056319878, -0.17858654056319878])
IF (whole-2_Intensity_MinIntensityEdge_OrigDAPI > 0.0066071599999999999, -0.28477352927601735, 0.28477352927601735], [0.089556221382791359, -0.089556221382791359])
IF (whole-2_Intensity_LowerQuartileIntensity_OrigDAPI > 0.0123750669882, -0.22324049601423096, 0.22324049601423096], [0.14870377806949203, -0.14870377806949203])
IF (whole-2_Intensity_StdIntensityEdge_OrigDAPI > 0.000648619239896, [0.087121239273707976, -0.087121239273707976], -0.34513402407004384, 0.34513402407004384])
IF (whole-2_Intensity_MinIntensityEdge_OrigDAPI > 0.0064240499999999997, [0.1487882776512704, -0.1487882776512704], -0.20781231719124041, 0.20781231719124041])
IF (whole-2_AreaShape_Zernike_5_1 > 0.00023699030143200001, [0.035021239074227398, -0.035021239074227398], -0.82519106666642894, 0.82519106666642894])
IF (whole-2_Texture_DifferenceVariance_OrigDAPI_3 > 0.71863987977499999, [0.13354642153174642, -0.13354642153174642], -0.22506037434355988, 0.22506037434355988])
IF (whole-2_RadialDistribution_FracAtD_OrigDAPI_1of4 > 0.0411749, -0.086013380552154323, 0.086013380552154323], [0.34497533251676266, -0.34497533251676266])
IF (whole-2_AreaShape_Zernike_4_2 > 0.0287770208221, -0.10032690835766961, 0.10032690835766961], [0.27550136883346749, -0.27550136883346749])
IF (whole-2_AreaShape_Orientation > 73.637546110299994, [0.51972004521053117, -0.51972004521053117], -0.040016411042509796, 0.040016411042509796])
IF (whole-2_AreaShape_FormFactor > 0.77921908770199999, -0.17025372446004572, 0.17025372446004572], [0.12455547167799823, -0.12455547167799823])
IF (whole-2_AreaShape_Zernike_2_0 > 0.16726757060899999, [0.081965160016035196, -0.081965160016035196], -0.34106627932464401, 0.34106627932464401])
IF (whole-2_AreaShape_Zernike_2_0 > 0.17071685745199999, -0.12289047475423939, 0.12289047475423939], [0.20566100160028325, -0.20566100160028325])
IF (whole-2_AreaShape_Zernike_9_1 > 0.0032529916814099998, -0.19710706988889881, 0.19710706988889881], [0.14575710992303079, -0.14575710992303079])
IF (whole-2_AreaShape_Zernike_5_3 > 0.012306874395699999, -0.6219090234570841, 0.6219090234570841], [0.033416187021367103, -0.033416187021367103])
IF (whole-2_AreaShape_Solidity > 0.96231155778900002, -0.1218019262370908, 0.1218019262370908], [0.25091172367055609, -0.25091172367055609])
IF (whole-2_Intensity_MaxIntensityEdge_OrigDAPI > 0.011780000000000001, -0.34248306246159355, 0.34248306246159355], [0.073043417135302158, -0.073043417135302158])
IF (whole-2_AreaShape_Zernike_7_5 > 0.0027138694135700001, [0.086900815650319652, -0.086900815650319652], -0.29838460763561592, 0.29838460763561592])
IF (whole-2_Intensity_MeanIntensity_OrigDAPI > 0.0122265375204, [0.087691892814623709, -0.087691892814623709], -0.31755335747163321, 0.31755335747163321])
IF (whole-2_Intensity_MeanIntensity_OrigDAPI > 0.0148804651801, -0.13024821077644166, 0.13024821077644166], [0.22999507737737637, -0.22999507737737637])
IF (whole-2_Intensity_StdIntensityEdge_OrigDAPI > 0.00055646774463999999, [0.058856442915031948, -0.058856442915031948], -0.48145029422342622, 0.48145029422342622])
IF (whole-2_RadialDistribution_MeanFrac_OrigDAPI_4of4 > 0.95337838772200001, [0.99999999999999534, -0.99999999999999534], -0.026917702780104222, 0.026917702780104222])
IF (whole-2_Texture_SumVariance_OrigDAPI_3 > 9.1752033945699996, [0.19269398259800871, -0.19269398259800871], -0.11002402529487712, 0.11002402529487712])
IF (whole-2_Texture_AngularSecondMoment_OrigDAPI_3 > 0.060240766317699999, [0.078680470502448085, -0.078680470502448085], -0.31251651692576499, 0.31251651692576499])
IF (whole-2_AreaShape_Orientation > -28.517446639500001, -0.12099274002985649, 0.12099274002985649], [0.24675440431397516, -0.24675440431397516])
IF (whole-2_AreaShape_Zernike_9_5 > 0.0091956957632399992, [0.56801421913229366, -0.56801421913229366], -0.042020232844507246, 0.042020232844507246])

In short, this error is caused by your pipeline re-measuring the same measurement twice. In this case, you have obtained texture measurements at scale 3 for the OrigDAPI image already, and the 2nd MeaureTexture module is attempting to calculate them again. You should remove OrigDAPI from the list of images to measure for the 2nd module.

Regards,
-Mark