extract
The extract command measures pixel counts in selected regions of one or more
GONet images.
Extraction can run in two modes:
Interactive mode, which opens the extraction GUI.
Direct mode, which performs extraction immediately from shape parameters supplied on the command line.
For the conceptual tool guide, see extraction tool guide.
Usage
GONet_Wizard extract [-h] [--blue] [--green] [--red]
[--shape {circle,rectangle,annulus,interactive}]
[--center CENTER] [--radius RADIUS] [--sides SIDES]
[--inner_radius INNER_RADIUS]
[--outer_radius OUTER_RADIUS]
[--angles ANGLES] [--output OUTPUT]
[--output_type {json,csv}] [--debug] [--port PORT]
[filenames ...]
Arguments
filenamesOne or more GONet image files to extract.
The command supports files, folders, wildcards, and comma-separated lists.
Launch Behavior
The extract command has two different fallback behaviors, depending on how
much information is provided.
Command Form Fallback
If the command is invoked without the required command-line inputs, GONet Wizard opens the Extract GUI form.
For example:
GONet_Wizard extract
This follows the same command-form fallback described in common CLI patterns.
Interactive Extraction Fallback
If input files are provided, but the command is not given enough information to perform a complete direct extraction, GONet Wizard launches the interactive extraction app.
For example:
GONet_Wizard extract image.jpg
This opens the interactive extraction app because files were provided, but no direct extraction shape and geometry were specified.
The same applies when the requested workflow is explicitly interactive:
GONet_Wizard extract image.jpg --shape interactive
Direct extraction only runs immediately when a non-interactive shape is selected and all parameters required by that shape are provided.
Channel Options
--blueExtract the blue channel.
--greenExtract the green channel.
--redExtract the red channel.
If no channel flags are provided, all channels are extracted.
Shape Options
--shape {circle,rectangle,annulus,interactive}Select the extraction shape.
If the shape is
interactiveor no shape is provided, the interactive extraction GUI opens.
Circle Extraction
Circular extraction requires:
--shape circle--center X,Y--radius RADIUS
Example:
GONet_Wizard extract image.jpg --shape circle --center 1000,800 --radius 50
Rectangle Extraction
Rectangular extraction requires:
--shape rectangle--center X,Y--sides WIDTH,HEIGHT
Example:
GONet_Wizard extract image.jpg --shape rectangle --center 1000,800 --sides 300,400
Annulus Extraction
Annular extraction requires:
--shape annulus--center X,Y--inner_radius INNER_RADIUS--outer_radius OUTER_RADIUS
Example:
GONet_Wizard extract image.jpg --shape annulus --center 1000,800 --inner_radius 40 --outer_radius 80
Interactive Extraction
Interactive extraction opens the dedicated extraction GUI.
Examples:
GONet_Wizard extract image.jpg
GONet_Wizard extract image.jpg --shape interactive
Angle Limits
--angles ANGLESOptional angular range as
start_angle,end_anglein degrees.
Angles are measured from the positive x axis and increase counter-clockwise.
Example:
GONet_Wizard extract image.jpg --shape circle --center 1000,800 --radius 100 --angles=-45,45
Output Options
--output OUTPUTOutput filename.
If omitted, a default filename based on the extraction shape is generated.
--output_type {json,csv}Output format.
JSON is the default output type.
Examples:
GONet_Wizard extract image.jpg --shape circle --center 1000,800 --radius 50 --output counts.json
GONet_Wizard extract image.jpg --shape circle --center 1000,800 --radius 50 --output counts.csv --output_type csv
Interactive Runtime Options
--debugRun the extraction GUI in debug mode.
--port PORTPort for the extraction GUI Dash server.
These options only matter when the interactive extraction GUI is launched.
Examples
Extract all channels from a circular region:
GONet_Wizard extract image.jpg --shape circle --center 1000,800 --radius 50
Extract only the red channel:
GONet_Wizard extract image.jpg --red --shape circle --center 1000,800 --radius 50
Extract all matching files to CSV:
GONet_Wizard extract *.jpg --shape annulus --center 1000,800 --inner_radius 40 --outer_radius 80 --output annulus_counts.csv --output_type csv
Launch the interactive extraction GUI on a folder:
GONet_Wizard extract /path/to/images --shape interactive
GUI Equivalent
The graphical equivalent is Extract GUI guide.