Giter Club home page Giter Club logo

nifti-rs's Introduction

NIFTI-rs โ€ƒ Latest Version Build Status dependency status

This library is a pure Rust implementation for reading files in the NIfTI format (more specifically NIfTI-1.1).

Example

use nifti::{NiftiObject, InMemNiftiObject, NiftiVolume};

let obj = InMemNiftiObject::from_file("myvolume.nii.gz")?;
// use obj
let header = obj.header();
let volume = obj.volume();
let dims = volume.dim();

The library will automatically look for the respective volume when specifying just the header file:

use nifti::{NiftiObject, InMemNiftiObject};

let obj = InMemNiftiObject::from_file("myvolume.hdr.gz")?;

With the "ndarray_volumes" feature enabled, you can also convert a volume to an ndarray::Array and work from there:

let volume = obj.into_volume().into_ndarray::<f32>();

Roadmap

This library should hopefully fulfil a good number of use cases. However, it still is a bit far from a complete solution. In particular, future versions should be able to:

  • Write NIFTI files;
  • Provide a more elegant volume API;
  • Handle more kinds of volumes;
  • Provide a real spatial-temporal interpretation of the volume (rather than just voxel-indexed);
  • Maybe add support for NIFTI-2?

There are no deadlines for these features, so your help is much appreciated. Consider filing an issue in case something is missing for your use case to work. Pull requests are also welcome.

License

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

nifti-rs's People

Contributors

enet4 avatar nilgoyette avatar

Watchers

James Cloos avatar

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.