You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Argument parser so that this script can be used from the command line.
86
+
parser=argparse.ArgumentParser(
87
+
description="Run segmentation and export the segmentation result for a lightsheet volume."
88
+
)
89
+
parser.add_argument(
90
+
"-i", "--input", required=True,
91
+
help="Path to the input volume. This should be the path to the xml file obtained after stitching."
92
+
)
93
+
parser.add_argument(
94
+
"-o", "--output", required=True,
95
+
help="Path to the output folder. This is where the MoBIE project, with image data and segmentation result, will be stored."# noqa
96
+
)
97
+
parser.add_argument(
98
+
"-s", "--segmentation_folder", required=True,
99
+
help="Path to a folder where intermediate results for the segmentation will be stored. "
100
+
"The results will be removed after the export to MoBIE."
101
+
)
102
+
parser.add_argument(
103
+
"--mobie_dataset",
104
+
help="Internal name of the dataset in MoBIE. If not given this will be derived from the name of the input volume.", # noqa
105
+
)
106
+
parser.add_argument(
107
+
"--setup_id", default=0, type=int,
108
+
help="The setup id to use for the segmentation. Choose the setup-id for the channel that contains the data to be used for segmentation."# noqa
109
+
"This should be the PV channel for SGN segmentation."
110
+
)
111
+
parser.add_argument(
112
+
"--scale", default=0, type=int,
113
+
help="The scale to use for segmentation. By default this will run at the lowest scale (= full resolution)."
114
+
)
101
115
parser.add_argument("--model")
102
-
116
+
parser.add_argument("--channel_names", nargs="+", default=None, help="The names of channels in the dataset, in the same order as the setup-ids.") # noqa
103
117
args=parser.parse_args()
104
118
119
+
# This is just some preparation logic to get a good size for filtering
120
+
# the nuclei depending on which scale we use for running the segmentation.
105
121
scale=args.scale
106
122
ifscale==0:
107
123
min_size=1000
@@ -110,18 +126,25 @@ def main():
110
126
else:
111
127
raiseValueError
112
128
129
+
# Here we read the path to the data from the xml file and we construct the
130
+
# input key (= internal file path in the n5 file with the data),
0 commit comments