Skip to content

Loaded images are gray scale #49

Description

@aknckaan

I am reading the nd2 file with the library however RGB channel doesn't show up.

Activity

  1. FrickTobias commented on Aug 16, 2021

    @FrickTobias

    Hi aknckaan,

    Could you give more information about your situation?

    Remember that someone else will not know anything about your system, versions, whether you are interpreting your traceback correctly, etc. Here is an example issue I made up, where someone more experienced could either help the programmer understand what they have done wrong or find the problem in the package.

    In this case it turns out the programmer has mistakenly added () at the end of images.sizes which tries to call on a function instead of a variable (or technically you would call it method since we're dealing with an instance here but it's very similar).

    Example issue: images.sizes doesn't work

    Problem description

    I am trying to print images.sizes but I just get a TypeError. Can someone help me?

    Code snippet

    from nd2reader import ND2Reader
    with ND2Reader(input) as images:
        print(images.sizes())
    

    Traceback

    Traceback (most recent call last):
      File "/Users/tobiasfrick/miniconda3/envs/ndt/bin/nd2tools", line 33, in <module>
        sys.exit(load_entry_point('nd2tools', 'console_scripts', 'nd2tools')())
      File "/Users/tobiasfrick/PycharmProjects/nd2tools/src/nd2tools/__main__.py", line 70, in main
        module.main(args)
      File "/Users/tobiasfrick/PycharmProjects/nd2tools/src/nd2tools/cli/movie.py", line 87, in main
        print(images.sizes())
    TypeError: 'dict' object is not callable
    

    Environment*

    *This could be harder to make yourself if you are new to programming and are not using virtual environments, but if you can include it I would highly recommend it.

    conda info
    
         active environment : ndt
        active env location : /Users/tobiasfrick/miniconda3/envs/ndt
                shell level : 2
           user config file : /Users/tobiasfrick/.condarc
     populated config files : /Users/tobiasfrick/.condarc
              conda version : 4.10.3
        conda-build version : not installed
             python version : 3.8.10.final.0
           virtual packages : __osx=10.16=0
                              __unix=0=0
                              __archspec=1=x86_64
           base environment : /Users/tobiasfrick/miniconda3  (writable)
          conda av data dir : /Users/tobiasfrick/miniconda3/etc/conda
      conda av metadata url : None
               channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                              https://conda.anaconda.org/conda-forge/noarch
                              https://conda.anaconda.org/bioconda/osx-64
                              https://conda.anaconda.org/bioconda/noarch
                              https://repo.anaconda.com/pkgs/main/osx-64
                              https://repo.anaconda.com/pkgs/main/noarch
                              https://repo.anaconda.com/pkgs/r/osx-64
                              https://repo.anaconda.com/pkgs/r/noarch
              package cache : /Users/tobiasfrick/miniconda3/pkgs
                              /Users/tobiasfrick/.conda/pkgs
           envs directories : /Users/tobiasfrick/miniconda3/envs
                              /Users/tobiasfrick/.conda/envs
                   platform : osx-64
                 user-agent : conda/4.10.3 requests/2.25.1 CPython/3.8.10 Darwin/20.6.0 OSX/10.16
                    UID:GID : 501:20
                 netrc file : None
               offline mode : False
    
    
  2. rbnvrw commented on Nov 8, 2021

    @rbnvrw
    Member

    Thank you for your report @aknckaan and thanks @FrickTobias for the help.

    Could you provide some more information on the problem as @FrickTobias suggested? Is your problem maybe already solved in the meantime?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions