Coder Social home page Coder Social logo

Comments (4)

tyarkoni avatar tyarkoni commented on July 18, 2024

But it looks so pretty! You sure you want to fix it?

Is the image 91 x 109 x 91? If not, that's probably the issue. Currently, transformations between image/world/canvas spaces are hardcoded to only work for those dimensions. This needs to be fixed by generalizing the matrix transformations in the Transform class in models.coffee to handle arbitrary dimensions based on the header.

from nsviewer.

tyarkoni avatar tyarkoni commented on July 18, 2024

Is this happening when loading from json, from nifti, or both?

from nsviewer.

chrisgorgo avatar chrisgorgo commented on July 18, 2024

JSON. Does the viewer support loading niftis directly? We can get rid of
this JSON silliness (it's quite slow)?

On Mon, Oct 28, 2013 at 6:05 PM, Tal Yarkoni [email protected]:

Is this happening when loading from json, from nifti, or both?


Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-27232008
.

from nsviewer.

tyarkoni avatar tyarkoni commented on July 18, 2024

Yes, the viewer supports loading nifti directly--this was one of the things we did at the hackathon in Boulder, remember? ;)

The tradeoff between the json and nifti approaches amounts to server vs. client-side loading time right now. For reasons I'm not entirely clear on, the xtk I/O code (which is what I'm using to read Nifti images in) is quite slow compared to constructing a volume from json. This is presumably an implementation issue, since reading from binary with typed arrays should be faster than filling a volume from plain text. But right now most json images load in under a second, whereas larger nifti volumes can take a few seconds to load from binary. But given that reading directly from nifti pushes the load to the client, and eliminates the need for server-side conversion, I would also support moving to binary-only. That's actually how neurosynth.org has been operating for the past few months.

The nsviewer documentation/example is already loading the MNI template from nifti, so you can look at that to see how it's done. Actually, I'm pretty sure that if you just change the filename from .json to .nii.gz or .nii everything should work seamlessly without having to do anything else.

from nsviewer.

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.