コード例 #1
0
ファイル: images.py プロジェクト: akki201/CellProfiler
 def prepare_run(self, workspace):
     '''Create an IPD for every url that passes the filter'''
     if workspace.pipeline.in_batch_mode():
         return True
     if self.wants_filter:
         env = J.get_env()
         jexpression = env.new_string_utf(self.filter.value_text)
         filter_fn = J.make_static_call(
             "org/cellprofiler/imageset/filter/Filter",
             "filter", "(Ljava/lang/String;Ljava/lang/String;)Z")
         ipds = filter(
             lambda ipd:filter_fn(jexpression, env.new_string_utf(ipd.url)), 
             workspace.pipeline.image_plane_details)
     else:
         ipds = workspace.pipeline.image_plane_details
     workspace.pipeline.set_filtered_image_plane_details(ipds, self)
     return True
コード例 #2
0
ファイル: images.py プロジェクト: crschmidt/CellProfiler
 def prepare_run(self, workspace):
     '''Create an IPD for every url that passes the filter'''
     if workspace.pipeline.in_batch_mode():
         return True
     if self.wants_filter:
         env = J.get_env()
         jexpression = env.new_string_utf(self.filter.value_text)
         filter_fn = J.make_static_call(
             "org/cellprofiler/imageset/filter/Filter", "filter",
             "(Ljava/lang/String;Ljava/lang/String;)Z")
         ipds = filter(
             lambda ipd: filter_fn(jexpression, env.new_string_utf(
                 ipd.url)), workspace.pipeline.image_plane_details)
     else:
         ipds = workspace.pipeline.image_plane_details
     workspace.pipeline.set_filtered_image_plane_details(ipds, self)
     return True