GithubHelp home page GithubHelp logo

plwp / nifti.net Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 7.0 1.26 MB

A basic library for reading, writing and manipulating NIfTI files.

License: MIT License

C# 100.00%
nifti nifti-format dotnet-standard

nifti.net's Introduction

Nifti.NET

A basic library for reading, writing and manipulating NIfTI files.

(If you're looking for the TensorFlow CNN platform, try NiftyNet (https://niftynet.io/))

nifti.net's People

Contributors

plwp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nifti.net's Issues

Writing Unity3D Texture3D to NIfTI file

Thanks for making this code available. I have a Unity3D app that use the VolumeViewPro Unity Asset to load multiple NIfTI files and display them in VR. These images are viewed an manipulated leading to changes in the underlying image data. So now I want to write a new Texture3D back out as a new NIfTI file. Not having any success yet...

I'm a middle level programmer so I may have missed some obvious way to use your NiftiFile.Write() routine. Texture3Ds are 3D array of Colors. After trying a number of variants, I can't figure out how to convert the Color array, nor what the proper datatype to use in your write file.

The error I get is:

System.Object.CallSite.Target(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Type,System.IO.Stream,object)
System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1, T2 arg2) (at <3e4da02cf86b4fc686ed0ac61bffc210>:0)
Nifti.NET.NiftiFile.Write (Nifti.NET.Nifti nifti, System.String path, System.Boolean gzip) (at Assets/NiftiFile.cs:78)

Any help greatly appreciated.

create a 3d Nifti viewer using the Library

i want to create an 3d Nifti Image Format Viewer ,it is possible to do that using the Nifti.net library if yes how can i convert the NiftiFile.Read(path); result to a 3d Bitmap

Thanks in advance

Incorrect Import of unsigned short (uint16) datasets

When importing a uint16 dataset the library creates a data array twice the correct size. Furthermore the values inside the array are shifted. Both the dimensions and datatype are being read correctly from the header. The "forcetype" parameter does not seem to work.

I tested the same dataset inside a different application and it worked fine.

To recreate the problem you can use the "wallnut.nii.gz" dataset provided by the University of Leipzig, Germany:

http://www.informatik.uni-leipzig.de/~wiebel/public_data/index.html

They also have the open source software called "OpenWalnut" to display the dataset:

http://www.openwalnut.org/

Technical details:
-Nifti.Net is used as a dll for a C# Script in Unity 2019.4.12f11
-Nifti.Data.Length return twice the correct size of the imported dataset array
-Dimensions and datatype are correct
-forcetype parameter in Nifti.Read does not change the outcome
-You can iterate past the size of a dimension in the dataset
-Displaying the dataset shows that the values are shifted in a certain pattern
-uint8 datasets are working fine with the lib

about API document

When you encounter some problems in use, can you write an API document?

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.