From 7d4eb4706e0485af1e58a883e6140e21c7d12f9b Mon Sep 17 00:00:00 2001 From: Pariksheet Nanda Date: Fri, 5 May 2017 07:37:37 -0400 Subject: [PATCH] ENH: Add ImageJ2 script to overlay image and ROIs --- src/imagej_open.groovy | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/imagej_open.groovy diff --git a/src/imagej_open.groovy b/src/imagej_open.groovy new file mode 100644 index 0000000..5315bfc --- /dev/null +++ b/src/imagej_open.groovy @@ -0,0 +1,21 @@ +import groovy.io.FileType // Recurse directories per http://stackoverflow.com/a/3954639 + +/** Path to project Git repo */ +def prefix = "/share/Pariksheet/consultations/rnai-screen-tf" + +/** + * Read a stack of raw images. + * + * @param plate name of the plate to match + * @param well name of the well in [A-P][01-24] format + */ +def open = {String plate, String well -> + def dirBg = new File("$prefix/results/z_projection") + def found = [] + dirBg.eachFileMatch(FileType.FILES, ~/${plate}_${well}_.+/) { + found << it.name + } + println found +} + +open("160415_015529-V", "C03")