|
| 1 | +import cellprofiler_core.module |
| 2 | +from cellprofiler_core.setting.subscriber import ImageSubscriber |
| 3 | +from cellprofiler_core.setting.text import ImageName |
| 4 | +from cellprofiler_core.setting.text import Text |
| 5 | +from cellprofiler_core.setting import Binary |
| 6 | +from cellprofiler_core.setting import Color |
| 7 | + |
| 8 | +__doc__ = """\ |
| 9 | +DumpIt |
| 10 | +====== |
| 11 | +
|
| 12 | +**DumpIt** does nothing of interest yet. |
| 13 | +
|
| 14 | +
|
| 15 | +I am a module |
| 16 | +look at me, |
| 17 | +about as simple |
| 18 | +as could be. |
| 19 | +
|
| 20 | +| |
| 21 | +
|
| 22 | +============ ============ =============== |
| 23 | +Supports 2D? Supports 3D? Respects masks? |
| 24 | +============ ============ =============== |
| 25 | +YES NO YES |
| 26 | +============ ============ =============== |
| 27 | +
|
| 28 | +""" |
| 29 | + |
| 30 | +class DumpIt(cellprofiler_core.module.ImageProcessing): |
| 31 | + module_name = "DumpIt" |
| 32 | + |
| 33 | + variable_revision_number = 1 |
| 34 | + |
| 35 | + def create_settings(self): |
| 36 | + self.x_name = ImageSubscriber( |
| 37 | + "Select the input image", doc="Select the image you want to use." |
| 38 | + ) |
| 39 | + |
| 40 | + self.y_name = ImageName( |
| 41 | + "Name the output image", |
| 42 | + self.__class__.__name__, |
| 43 | + doc="Enter the name you want to call the image produced by this module.", |
| 44 | + ) |
| 45 | + self.overlay_text = Text("Some Text", "Hello World!", doc="The text you would like to be overlayed on top of the image.") |
| 46 | + |
| 47 | + self.binary = Binary("Some binary", True) |
| 48 | + self.color = Color("Some color choice", "red") |
| 49 | + |
| 50 | + def settings(self): |
| 51 | + return [self.x_name, self.y_name, self.overlay_text, self.binary, |
| 52 | + self.color] |
| 53 | + |
| 54 | + def visible_settings(self): |
| 55 | + return self.settings() |
| 56 | + |
| 57 | + def run(self, workspace): |
| 58 | + self.function = lambda x_data, args: ... |
| 59 | + super().run(workspace) |
0 commit comments