Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIfTI-1 (.nii) import #48

Closed
mlavik1 opened this issue Jun 3, 2021 · 7 comments
Closed

NIfTI-1 (.nii) import #48

mlavik1 opened this issue Jun 3, 2021 · 7 comments
Assignees
Labels

Comments

@mlavik1
Copy link
Owner

mlavik1 commented Jun 3, 2021

Add support for importing NIfTI-1 datasets.

Data format specification: https://nifti.nimh.nih.gov/nifti-1
Test data sets: https://nifti.nimh.nih.gov/nifti-1/data
Example of a NIfTI-1 file reader: https://github.com/Enet4/nifti-stream

@mlavik1 mlavik1 added help wanted Extra attention is needed feature labels Jun 3, 2021
@iowagrade
Copy link

iowagrade commented Oct 16, 2021

I will take a look at this issue. In issue #36, you referenced exporting the files as a .jpg dataset. Can you provide more information on what software you used for import/export of the files? I tried installing darktable to utilize with gimp to read .raw files, but didn't have straightforward luck. Can you mention which software you use with .raw files? I will also take a look at issue #53 with importing NRRD files and see if I can locate the synergy amongst the tasks.

@mlavik1
Copy link
Owner Author

mlavik1 commented Oct 16, 2021

Hi, Thank you, that would be great!
I really appreciate any contributions I can get.
I'm not at all familiar with the NIfTI-1 format (I added this task after receiving a feature request for it), but let me know if there's anything else I can assist with :)

And I think that issue is not related to this. In #36 I just opened the link to the DICOM dataset Chiara shared (https://www.dicomlibrary.com/meddream/?study=1.2.826.0.1.3680043.8.1055.1.20111102150758591.92402465.76095170) and exported the dataset as a JPEG image sequence. So I didn't use any software to open .raw files.
But if I remember correctly, ImageVis3D has that feature!
This project also has a RAW importer by the way: https://github.com/mlavik1/UnityVolumeRendering/blob/master/Assets/Scripts/Importing/RawDatasetImporter.cs

By the way, for all import-related tasks please keep in mind that it needs to work cross platform (Windows, Linux, MacOS, and ideally Android too) out of the box. Using a large library like SimpleITK could then be a potential issue, since it will take up a lot of space and we need to build and host the .dll/.so files somewhere.
So it's best to avoid dependencies to large libraries, especially native (not .NET) ones, as much as possible. If it's needed, please let me know so we can try to come up with a good solution.

@mlavik1 mlavik1 self-assigned this Mar 31, 2022
@mlavik1 mlavik1 removed the help wanted Extra attention is needed label Mar 31, 2022
@Contused
Copy link

Contused commented Apr 5, 2022

Hi,
I worked with your plugin last year and built a little nifti importer on top. I used the https://github.com/plwp/Nifti.NET as a .dll library. If you think this can be any help to you, we can get in contact.

@mlavik1
Copy link
Owner Author

mlavik1 commented Apr 5, 2022

Hi! Thanks for mentioning this! I didn't know about this library.
I'm actually working on adding an optional integration of the SimpleITK library, which supports NIFTI import. However, the problem with SimpleITK is that it's a native library, and won't automatically work on all platforms, unless I build binaries for that platform. So It would be good to have a non-native library to use on these platforms as well, and NIFTI.net seems like a great alternative! Do you have an open fork that I can look at?

@Contused
Copy link

Contused commented Apr 5, 2022

I just forked the project and added my editor script. I also added 2-3 sentences to the readme about the intended import process. Please consider that the script was made for a private prototype to import a certain dataset. It´s nowhere near polished. Much work has to be done to properly integrate the importer into your project and get it to work for all nifti datasets.
https://github.com/Contused/UnityVolumeRendering

@mlavik1
Copy link
Owner Author

mlavik1 commented Apr 6, 2022

Thank you, this is very useful!
I will take a look at this when I have finished my SimpleITK-related work. I've changed the importer interface in that branch a bit.

@mlavik1
Copy link
Owner Author

mlavik1 commented Oct 24, 2022

Closing, since we now have both the SimpleITK importer (that supports Nifti), as well as a non-native importer for other platforms.

@mlavik1 mlavik1 closed this as completed Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants