elgw / nd2tool

Convert Nikon nd2 files to tiff
MIT License
6 stars 0 forks source link

Split along z-planes #4

Closed qverron closed 9 months ago

qverron commented 10 months ago

. Add flag to split nd2 file into single 2D planes instead of the current 3D z-stacks.

. Add flag to format split data according to SpaceTx convention:

The stem of the tiles’ filenames must be -f-r-c-z. The extension should be one of the formats supported by slicedimage.ImageFormat (tiff, png, npy). For example, the file nuclei-f0-r2-c3-z33.tiff would belong to the nuclei image, fov 0, round 2, channel 3, zplane 33.

The minimum time_types are "primary" (FISH imaging rounds) and "nuclei" (DAPI). We could attribute all FISH channels to "primary" with the different colors encoded into the -c variable. It would be great to fetch metadata to create the physical coordinates csv file at the same time.

ref: https://spacetx-starfish.readthedocs.io/en/latest/gallery/data_formatting/plot_format_structured_data.html#format-structured-data https://spacetx-starfish.readthedocs.io/en/latest/help_and_reference/spacetx-format/SpaceTxFormat/index.html#sptx-format

elgw commented 9 months ago

Hi! I added this feature to version 0.1.5.

The corresponding *--help** section looks like this:

  --SpaceTx
    Save one image per z-plane according to the SpaceTx convention.
    <image_type>-f<fov_id>-r<round_label>-c<ch_label>-z<zplane_label>
    <image_type> will be the name of the nd2file (without extension)
    <round_label> will always be 0.

Marking as solved. Please reopen if you'd like any revisions.