-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Requirement
We would like to have a command line interface that can be used like this:
scitiff_values input_tiff_with_multi_channel.tiff /path/to/output_tiff_only_with_intensities_channel.tiff
Expected Input
Any tiff file including scitiff flie that has multiple channel (variances and mask).
Expected Output
A new Scitiff file that does not have extra channel other than values(intentisites) of the input file.
-
INFOif the image is already single channel and do nothing. -
INFOabout the result if succeeded.
About the Project
Scitiff stands for scientific tiff.
It aims to encode scientific metadata as a plain text along with the image data in tiff.
See our scitiff documentation for more details.
Development Environment
See Developer Guide to set up the local environment.
Setting up a remote repository
Go to the base branch, channel-slicer, and fork the repo.
TODO list of this issue
-
Complete the implementation of the
valuesAPI.
scitiff/src/scitiff/executables.py
Lines 226 to 238 in f765344
def values(): """ Slice channel dimension from image. """ import argparse from ._img_processors import values # noqa: F401 parser = argparse.ArgumentParser( description="Quickly show metadata of a tiff file." ) parser.add_argument(type=str, dest="input_file_name", help="Input file name.") parser.add_argument(type=str, dest="output_file_name", help="Output file name.") It should probably use python `values` API: https://github.com/scipp/scitiff/blob/bea312571bbcfc9d6c3609d8f1ecbf3c408c42a3/src/scitiff/_img_processors.py#L9-L11 -
Expose the executables
valuesapi as a command line interface.
Lines 48 to 52 in f765344
[project.scripts] scitiff-dev-dump-schemas = "scitiff._schema:dump_schemas" scitiff-dump-metadata-example = "scitiff.executables:dump_metadata_example" scitiff-show-metadata = "scitiff.executables:print_metadata"
See how other scripts are exposed and addscitiff_valuescommand there! -
Write documentation page. Under user-guide, Could be a separate sub-issue
-
Write unit tests. Could be a separate sub-issue
scitiff/tests/scitiff_values_test.py
Lines 1 to 3 in f765344
# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2025 Ess-dmsc-dram contributors (https://github.com/ess-dmsc-dram) # Placeholder for `values` api, that slices `Value` channels. Writing unit test for this command line interface might be challenging. We can skip it from this issue. -
Test with ImageJ (Optional)
-
Open a PR (Pull Request)
Set the base branch tochannel-slicer.
Related Information for Implementation
Scipp User Guide for Slicing
https://scipp.github.io/user-guide/slicing.html
We are going to learn more about scipp on Wednesday, so no need to dig in too deep 😁
IO module documentation
IO Helper Tutorial
Good starting point to see what scitiff do and to see what helper functions there are for development.
Meaning of Channel in Scitiff
This section of IO tutorial explains what channels mean in scitiff.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status