Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Must include label_dir as parameter, currently function does not set to default as None #18

Open
2 tasks done
jenna-tomkinson opened this issue Jan 28, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@jenna-tomkinson
Copy link
Member

Is this a duplicate of an existing idea for this project?

  • I found no existing issues covering this topic.

What is your idea?

Hello!

I am excited to get to use this tool! After some testing, I realized that the current tiff to OMETIFF or OMEZARR does not have the default for labels as None, but says it is optional in the docstring.

I think it would be beneficial, since the parameter is optional, to set the default for the function as None.

Here is the error I was getting with the code:

# convert original data into OME-TIFF format through nViz
nviz_ome_tiff = nviz.tiff_to_ometiff(
    # specify an image directory (original images)
    image_dir=test_image_dir,
    # specify an output path
    output_path=output_ome_tiff_path,
    # map filename patterns to channel names
    channel_map={
        "111": "Channel A",
        "222": "Channel B",
        "333": "Channel C",
        "444": "Channel D",
        "555": "Channel E",
    },
    # set the scaling for z, y, and x
    scaling_values=scaling_values,
)

# show the filepath
nviz_ome_tiff
TypeError                                 Traceback (most recent call last)
Cell In[6], line 2
      1 # convert original data into OME-TIFF format through nViz
----> 2 nviz_ome_tiff = nviz.tiff_to_ometiff(
      3     # specify an image directory (original images)
      4     image_dir=test_image_dir,
      5     # specify an output path
      6     output_path=output_ome_tiff_path,
      7     # map filename patterns to channel names
      8     channel_map={
      9         "111": "Channel A",
     10         "222": "Channel B",
     11         "333": "Channel C",
     12         "444": "Channel D",
     13         "555": "Channel E",
     14     },
     15     # set the scaling for z, y, and x
     16     scaling_values=scaling_values,
     17 )
     19 # show the filepath
     20 nviz_ome_tiff

TypeError: tiff_to_ometiff() missing 1 required positional argument: 'label_dir'

Would you like to work on a solution for this?

  • Yes I am willing to submit a PR for this!
@d33bs
Copy link
Member

d33bs commented Jan 29, 2025

Thanks for finding this @jenna-tomkinson ! Let me know if you need any assistance as you proceed with a fix.

@d33bs d33bs added the bug Something isn't working label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants