Coder Social home page Coder Social logo

Comments (1)

zivy avatar zivy commented on September 13, 2024 1

Hello @sandraMarcadent

I am guessing you are working on a windows system. There was a bug with the Show command on windows which has since been fixed.

You have three options:

  1. Don't use Show for now and wait for the upcoming minor release (~next month).

  2. If you are comfortable with compiling the toolkit yourself (you have Cmake, git, a compiler):
    a. For vanilla Python distribution you can follow the instructions found here.
    b. If you are working with Conda you can use the conda recipe found here. You will have to edit the meta.yaml file based on the instructions so that you are compiling the latest commit.

  3. You are in a hurray but don't want to wait for the minor release. The following is a stopgap solution that allows you to code as if Show works:

# Override the Show method to WriteImage at the top of the notebook
sitk.Show = sitk.WriteImage

#Code using "Show" as usual
img = sitk.Image([32,32], sitk.sitkUInt8)
sitk.Show(img, 'my_image.mha')

With the overriding, the code above will write the image to disk and then you can open it with Fiji or any other viewer you want, no hanging. Once the show command is fixed and you remove the single line at the top of the notebook you won't need to change your code. The Fiji viewer will open the image and the title will be "my_image.mha".

Please close the issue if these resolved your problem.

from simpleitk-notebooks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.