Giter VIP home page Giter VIP logo

Comments (8)

Jeremie-BIC avatar Jeremie-BIC commented on September 26, 2024 1

Dear Niels,

Thank you for taking the time.
I will report this to ITK.

Best regards,

Jérémie

from itkelastix.

N-Dekker avatar N-Dekker commented on September 26, 2024

Hi @Jeremie-BIC

Thank you for reporting this issue. Marius Staring (@mstaring) and I just looked at it, and it seems to us that it isn't a specific elastix/ITKElastix issue, but rather an ITK issue, or an itkwidgets issue. In that case, maybe you'd better report this to ITK (https://discourse.itk.org or https://github.com/InsightSoftwareConsortium/ITK/issues) or itkwidgets: https://github.com/InsightSoftwareConsortium/itkwidgets

Kind regards, Niels

from itkelastix.

dzenanz avatar dzenanz commented on September 26, 2024

This is most likely a limitation of the graphics subsystem (GPU does not have enough memory to fit the entire image in it) or VTK, the visualization library https://github.com/InsightSoftwareConsortium/itkwidgets uses. @floryst or @thewtex might have a better idea of where the problem comes from.

from itkelastix.

floryst avatar floryst commented on September 26, 2024

For itkwidgets, browser tabs usually have a ceiling on the memory allocation, though that usually results in a browser tab crash and not a blank image. If it's a TIF image, my guess would be that the underlying itk-wasm WebWorker is failing or crashing silently (possibly due to out-of-memory), leading to the display of a blank image...

from itkelastix.

Jeremie-BIC avatar Jeremie-BIC commented on September 26, 2024

Hi,

Thank you for help!

I understand that such a big file might be impossible to display in the Jupyter Notebook through the Itk Widget viewer.

However when I try to do a simpler operation, such as change the pixel spacing, I get an error. I think that the problem is happening when I open my image (using itk.imread).

I guess that, like Niels suggested, it is an ITK problem...

In case, I am putting the error I get. Any suggestion would be super appreciated.
Error is:

TypeError Traceback (most recent call last)
in
1 fixed_image.SetSpacing((25,25,25))
2 moving_image.SetSpacing((25,25,25))
----> 3 upscale_image.SetSpacing((2,2,4))
4
5 #fixed_image_resolution=fixed_image.GetSpacing() #prints spacing

TypeError: Expecting an itkVectorD2, an int, a float, a sequence of int or a sequence of float.
Additional information:
Wrong number or type of arguments for overloaded function 'itkImageBase2_SetSpacing'.
Possible C/C++ prototypes are:
itkImageBase2::SetSpacing(itkVectorD2 const &)
itkImageBase2::SetSpacing(double const *)
itkImageBase2::SetSpacing(float const *)

Thank you very much.

Best,

Jérémie

from itkelastix.

dzenanz avatar dzenanz commented on September 26, 2024

You might need something like:

spacing = itk.spacing((2,2,4))  # like this?
spacing = itk.spacing([2,2,4])  # or maybe like this?
upscale_image.SetSpacing(spacing)

from itkelastix.

thewtex avatar thewtex commented on September 26, 2024

Large scale registration support coming via https://github.com/InsightSoftwareConsortium/itk-dreg.

from itkelastix.

thewtex avatar thewtex commented on September 26, 2024

itk-widgets has support for large-scale images via NGFF. See: https://github.com/InsightSoftwareConsortium/itkwidgets/blob/main/examples/integrations/zarr/OME-NGFF-Brainstem-MRI.ipynb

from itkelastix.

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.