Copy

In order to make a copy of the portion of the stack, run the following in your command line:

    corgie copy \
--src_layer_spec '{
   "name": "unaligned",
   "path": "gs://corgie/demo/example_stack/img/unaligned"
   }' \
--src_layer_spec '{
   "name": "fold_mask",
   "type": "mask",
   "path": "gs://corgie/demo/example_stack/mask/fold_mask"
   }' \
--dst_folder $CORGIE_WALKTHROUGH_PATH \
--mip 6 \
--start_coord "150000, 150000, 17000" \
--end_coord "200000, 200000, 17010" \
--chunk_xy 1024 --chunk_z 1

The command specifies source data layers through --src_layer_spec. This stack has two layers, so --src_layer_spec flag is used twice. Next, --dst_folder specifies the destination folder where all of the source layers will be copied.

Note that we are not copying the whole example stack, but just a 10 section cutout. The command specifies the region of interest through --start_coord and --end_coord. Both start and end coordinates are provided as 3 comma separated integers – X, Y and Z coordinates. The start and end coordinates form a bounding cube, and all of the source data within this bounding cube will be copied over to the destination. In this example, we will copy all the data in X range 150000-200000, Y range 150000-200000, and Z range 17000-17010. --mip specifies what MIP level of the data will be copied, which in this case is 6.

Note

By default, X and Y coordinates are considered to be at MIP0. You can change this default behavior by passing –coord_mip parameter

Note

Unlike start and end coordinates, chunk size is considered to be provided at the MIP used for processing, which is MIP6 in this example.

Lastly, we need to specify Precomputed chunking parameters. corgie is designed to deal with large datasets that cannot fit in memory, and so it operates on large images in smaller chunks. --chunk_xy with --chunk_z define the size of each chunk. In this example, our stack will be copied in chunks of size 1024x1024x1 at MIP6.

To learn more about copy command, please refer to copy command documentation.