|
24 | 24 | import skimage.io |
25 | 25 | import cpij.bridge as ijbridge, cpij.server as ijserver |
26 | 26 |
|
| 27 | +imagej_link = "https://doi.org/10.1038/nmeth.2089" |
| 28 | +imagej2_link = "https://doi.org/10.1186/s12859-017-1934-z" |
| 29 | +pyimagej_link = "https://doi.org/10.1038/s41592-022-01655-4" |
| 30 | + |
27 | 31 | __doc__ = """\ |
28 | 32 | RunImageJScript |
29 | 33 | ================= |
|
51 | 55 | ^^^^^^^^ |
52 | 56 |
|
53 | 57 | ImageJ Scripting: https://imagej.net/Scripting |
| 58 | +Schneider, C. A., Rasband, W. S., & Eliceiri, K. W. (2012). NIH Image to ImageJ: 25 years of image analysis. Nature Methods, 9(7), 671–675. {imagej_link} |
| 59 | +Rueden, C. T., Schindelin, J., Hiner, M. C., DeZonia, B. E., Walter, A. E., Arena, E. T., & Eliceiri, K. W. (2017). ImageJ2: ImageJ for the next generation of scientific image data. BMC Bioinformatics, 18(1). {imagej2_link} |
| 60 | +Rueden, C.T., Hiner, M.C., Evans, E.L. Pinkart, M.A., Lucas, A.M., Carpenter, A.E., Cimini, B.A., & Eliceiri, K. W. (2022). PyImageJ: A library for integrating ImageJ and Python. Nat Methods 19, 1326–1327 . {pyimagej_link} |
| 61 | +
|
54 | 62 | |
55 | 63 | """ |
56 | 64 |
|
@@ -112,6 +120,8 @@ class RunImageJScript(Module): |
112 | 120 | variable_revision_number = 3 |
113 | 121 | category = "Advanced" |
114 | 122 |
|
| 123 | + doi = {"If you are using RunImageJScript please cite the following": pyimagej_link } |
| 124 | + |
115 | 125 | def __init__(self): |
116 | 126 | super().__init__() |
117 | 127 | self.parsed_params = False # Used for validation |
@@ -504,6 +514,12 @@ def validate_module_warnings(self, pipeline): |
504 | 514 | def run(self, workspace): |
505 | 515 | self.init_pyimagej() |
506 | 516 |
|
| 517 | + # Unwrap the current settings from their SettingsGroups |
| 518 | + all_settings = list(map(lambda x: x.settings[0], self.script_parameter_list)) |
| 519 | + # Update the script input/output settings in case any were removed from the GUI |
| 520 | + self.script_input_settings = {k: v for (k,v) in self.script_input_settings.items() if v in all_settings} |
| 521 | + self.script_output_settings = {k: v for (k,v) in self.script_output_settings.items() if v in all_settings} |
| 522 | + |
507 | 523 | if self.show_window: |
508 | 524 | workspace.display_data.script_input_pixels = {} |
509 | 525 | workspace.display_data.script_input_dimensions = {} |
|
0 commit comments