-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* updated screenshots for 2.0.0 * simplified example macro (with more complex macro in `examples/`). * fix: pc output is _not_ a label image!
- Loading branch information
Showing
6 changed files
with
50 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,36 @@ | ||
#@ File (label = "Project file", style = "file") project | ||
// Lines that start with "//" are comments. | ||
|
||
// Lines that start with "#@" declare input parameters that interactively ask the user for values. | ||
// You can remove those lines and set input parameters explicitly in order to run the macro without further user interaction. | ||
|
||
#@ File (label = "Project file", style = "file") pixelClassificationProject | ||
// project = "/absolute/path/to/some/directory/pixel_class_2d_cells_apoptotic.ilp"; | ||
|
||
#@ File (label = "Input file", style = "file") input | ||
// input = "/absolute/path/to/some/directory/2d_cells_apoptotic.tif"; | ||
#@ File (label = "Input file", style = "directory") dataDir | ||
// dataDir = "/absolute/path/to/some/directory/"; | ||
|
||
// set global variables | ||
outputType = "Probabilities"; // or "Segmentation" | ||
inputDataset = "data"; | ||
outputDataset = "exported_data"; | ||
axisOrder = "tzyxc"; | ||
compressionLevel = 0; | ||
|
||
// process all H5 files in a given directory | ||
fileList = getFileList(dataDir); | ||
for (i = 0; i < fileList.length; i++) { | ||
// import image from the H5 | ||
fileName = dataDir + fileList[i]; | ||
importArgs = "select=" + fileName + " datasetname=" + inputDataset + " axisorder=" + axisOrder; | ||
run("Import HDF5", importArgs); | ||
|
||
type = "Probabilities"; | ||
// run pixel classification | ||
inputImage = fileName + "/" + inputDataset; | ||
pixelClassificationArgs = "projectfilename=" + pixelClassificationProject + " saveonly=false inputimage=" + inputImage + " pixelclassificationtype=" + outputType; | ||
run("Run Pixel Classification Prediction", pixelClassificationArgs); | ||
|
||
open(input); | ||
run("Run Pixel Classification Prediction", "projectfilename=[" + project + "] input=[" + input + "] pixelclassificationtype=[" + type + "]"); | ||
// export probability maps to H5 | ||
outputFile = dataDir + "output" + i + ".h5"; | ||
exportArgs = "select=" + outputFile + " datasetname=" + outputDataset + " compressionlevel=" + compressionLevel; | ||
run("Export HDF5", exportArgs); | ||
} |