Skip to content

Commit

Permalink
input measurement
Browse files Browse the repository at this point in the history
  • Loading branch information
ErinWeisbart committed Aug 23, 2024
1 parent 1c1468b commit 0ed198c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions active_plugins/filterobjects_stringmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
)
from cellprofiler_core.setting.text import Alphanumeric
from cellprofiler_core.setting.choice import Choice
from cellprofiler_core.setting import Measurement

__doc__ = ""

Expand Down Expand Up @@ -61,20 +62,25 @@ def create_settings(self):
(e.g. Object 'AAAAB' will be filtered by string 'AAAA').""",
)

#self.filter_column =
self.filter_column = Measurement("Measurement",
lambda: "Image",
"",
doc="""Select the measurement column that will be used for filtering.""",
)

self.rules.create_settings()

def settings(self):
settings = super(FilterObjects_StringMatch, self).settings()
settings += [self.filter_out,self.filter_method]
settings += [self.filter_out,self.filter_method, self.filter_column]
return settings

def visible_settings(self):
visible_settings = super(FilterObjects_StringMatch, self).visible_settings()
visible_settings += [
self.filter_out,
self.filter_method
self.filter_method,
self.filter_column
]
return visible_settings

Expand Down Expand Up @@ -179,7 +185,7 @@ def keep_by_string(self, workspace, src_objects):
"""
src_name = self.x_name.value
m = workspace.measurements
values = m.get_current_measurement(src_name, "Barcode_BarcodeCalled")
values = m.get_current_measurement(src_name, self.filter_column)
if self.filter_method == METHOD_EXACT:
# Is this structure still necessary or is it an artifact?
# Could be just values == self.filter_out.value
Expand Down

0 comments on commit 0ed198c

Please sign in to comment.