rsip-vision / medio Goto Github PK
View Code? Open in Web Editor NEWMedical images I/O python package
License: Apache License 2.0
Medical images I/O python package
License: Apache License 2.0
Inspired by the hypermodern-python article series and modern python cookiecutters:
Modernize the medio
Python package.
Specifically:
from medio import read_img
read_img("path to image", backend='itk')
Exception:
AttributeError: 'NoneType' object has no attribute 'CanReadFile'
If we can easily move between medio and ITK then we can use ITK functionality
Probably by using nibabel's one.
Currently, private fields in the header not read.
itk
backend, it should be simple as:
reader.LoadPrivateTagsOn()
pdcm
, I need to check if it's read by default (I think it does, but not sure).nib
backend.Inspired by contrib-pydicom:
Looks like the following should complement medio's is_dicom
function:
def is_dcm(filename):
with open(filename, 'rb') as f:
x = f.read(132)
return x[128:] == b"DICM"
It is particularly useful since many times dicom files lack any extension.
I checked the above is_dcm
on some data and it looks reliable.
With that, we can change the default dicom reader backend to pydicom (single and series).
Edit:
Even better, use pydicom's built-in is_dicom
function (equivalent to the above is_dcm
function).
It would be nice to be able to create an empty image with the same size and metadata as an existing one, without needing to read in the whole existing image, but probably just its header.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.