Enet4 / niftijio

A Java library for reading and writing NIfTI volumes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

niftijio

Java CI with Maven

This project is a Java library for reading and writing NIfTI image volumes. This includes support for header metadata, various datatypes, and multichannel volumes. When a volume is read from a file, the image intensities are stored in a four-dimensional double array. The array indices match the order in the 'dim' array of the header.

Using as a library

When using Maven, add JitPack to your repositories list:

    <repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Then you may add niftijio:

        <dependency>
            <groupId>com.github.Enet4</groupId>
            <artifactId>niftijio</artifactId>
            <version>1.2.0</version>
        </dependency>

Using as an executable

Run mvn package to obtain niftijio.jar. Then:

java -Xmx512M -jar niftijio.jar example.nii.gz

The file format specification can be found here.

The code for reading the header was derived from the following implementation: http://niftilib.sourceforge.net

The code for little-endian streams is provided by Roedy Green: http://mindprod.com/jgloss/endian.html

License

This is released under the MIT license. Any comments can be directed to Ryan Cabeen at cabeen@gmail.com

This fork is maintained by Eduardo Pinho.

About

A Java library for reading and writing NIfTI volumes

License:MIT License


Languages

Language:Java 100.0%