I want to use deep learning for medical image segmentation as my graduation thesis, the data used is 2015 brats challenge.
for example: MHA file
but i don't how to open the .mha files by use python.I use the tensorflow framework, so it's more convenient to use python, and besides that, I need to do some preprocessing of the data graph.
from medpy.io import load
url = r'G:\path\to\mine.mha'
mage_data,image_header = load(url)
Then:
medpy.core.exceptions.DependencyError: Loading images of type Itk/Vtk MetaImage (.mhd, .mha/.raw) requires a third-party module that could not be encountered. Reason: No module named 'filter'.
The brats challenge is an international competition.But I don't know what network structure I'm supposed to use to train my network. If you have good advice, please let me know.
You can use MedPy package for this.
sudo apt-get install python-pip python-numpy python-scipy libboost-python-dev build-essential
Then:
sudo pip install nibabel pydicom medpy
And the Python usage:
from medpy.io import load
mage_data, image_header = load('/path/to/image.mha')
The library supports some useful preprocessing and analysis functions as well.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With