Closed benjaminralex closed 10 months ago
Hi,
@naterichman has just begun work on a feature allowing you to write to dicom, which will also need pixel and slice spacing, and a .nii saver could piggyback off a lot of these features. But it might take a while before it is available.
Currently we are able to read more data than we actually store to the OCT/Fundus classes. You can see what is extracted for each reader here. I've been thinking of implementing a .get_all_metadata()
method in the readers that will get all the metadata we're able to extract from a file and store it as a dict in the class, so that users are able to do what they like with this data - you should be able to do this to write your own .nii reader, while we wait on a more complete solution that mimics the dicom writer. Does that sound useful? If so, is there a particular filetype you're interested in? I could start implementing for that filetype and build from there.
That would be perfect actually!
E2E, ZeissDCM, and FDS would be great starting points. Really all of them, because downstream viewing and packaging into dicom/nifits is not possible without the metadata.
I might try to create a get_all_metadata method for my specific application. If successful, I will definitely pass it along.
Thanks a lot. Much appreciated 👍
OK sounds good, let me know if you need any help!
Hey,
Just flagging that I've added a .read_all_metadata
function to fda and will add to fds soon, here:
https://github.com/marksgraham/OCT-Converter/blob/ebd22e560779eb442b4666451244bbccf28f0958/oct_converter/readers/fda.py#L217
There is now functionality to export to dicom files, too. Closing this for now.
Hello,
Thanks for the awesome work! This has been a really helpful tool.
After extracting the necessary volumes as numpy arrays, I would like to store them as nifit files. For that, I would need the necessary pixel and slice spacing values. Is this something that can be extracted from the original files?
Have you encountered this when displaying or visualizing the extracted arrays?
Thanks.