vincent1bt / healthy-notebooks Goto Github PK
View Code? Open in Web Editor NEWJupyter notebooks about Machine and Deep Learning in healthcare
Jupyter notebooks about Machine and Deep Learning in healthcare
@vincent1bt Thanks for sharing your code tutorial.
I work with nii ct files.
With your code, I have been able to convert into hu and window the nii files fine.
But the mask, pad and crop just doesn't work. Any reason for this?
Masking output on regular and HU file
Cropping output on regular and HU file
Padding output on regular and HU file
I supply a single axial nii array slice to the functions for comparion and they don't work. Please help!
Followed the steps explained in notebook
I would like to know whay my resampled_image space showing (302, 302, 0). I believe that migh t be reason it's not displaying in plt.imshow
resampled_image = resample(first_image, image_thickness, pixel_spacing)
np.squeeze(resampled_image).shape
(302, 302, 0)
plt.imshow(resampled_image)
TypeError Traceback (most recent call last)
in
----> 1 plt.imshow(resampled_image)
~/anaconda3/lib/python3.7/site-packages/matplotlib/pyplot.py in imshow(X, cmap, norm, aspect, interpolation, alpha, vmin, vmax, origin, extent, shape, filternorm, filterrad, imlim, resample, url, data, **kwargs)
2681 filternorm=filternorm, filterrad=filterrad, imlim=imlim,
2682 resample=resample, url=url, **({"data": data} if data is not
-> 2683 None else {}), **kwargs)
2684 sci(__ret)
2685 return __ret
~/anaconda3/lib/python3.7/site-packages/matplotlib/init.py in inner(ax, data, *args, **kwargs)
1599 def inner(ax, *args, data=None, **kwargs):
1600 if data is None:
-> 1601 return func(ax, *map(sanitize_sequence, args), **kwargs)
1602
1603 bound = new_sig.bind(ax, *args, **kwargs)
~/anaconda3/lib/python3.7/site-packages/matplotlib/cbook/deprecation.py in wrapper(*args, **kwargs)
367 f"%(removal)s. If any parameter follows {name!r}, they "
368 f"should be pass as keyword, not positionally.")
--> 369 return func(*args, **kwargs)
370
371 return wrapper
~/anaconda3/lib/python3.7/site-packages/matplotlib/cbook/deprecation.py in wrapper(*args, **kwargs)
367 f"%(removal)s. If any parameter follows {name!r}, they "
368 f"should be pass as keyword, not positionally.")
--> 369 return func(*args, **kwargs)
370
371 return wrapper
~/anaconda3/lib/python3.7/site-packages/matplotlib/axes/_axes.py in imshow(self, X, cmap, norm, aspect, interpolation, alpha, vmin, vmax, origin, extent, shape, filternorm, filterrad, imlim, resample, url, **kwargs)
5669 resample=resample, **kwargs)
5670
-> 5671 im.set_data(X)
5672 im.set_alpha(alpha)
5673 if im.get_clip_path() is None:
~/anaconda3/lib/python3.7/site-packages/matplotlib/image.py in set_data(self, A)
688 or self._A.ndim == 3 and self._A.shape[-1] in [3, 4]):
689 raise TypeError("Invalid shape {} for image data"
--> 690 .format(self._A.shape))
691
692 if self._A.ndim == 3:
TypeError: Invalid shape (302, 302, 0) for image data
Hi, how to obtain the window width and window center values from a nifti image?
Hi Vincent,
Could you share the sample data of AD.ipynb?
ad-2d.zip
cn-2d.zip
It would be nice to run it on Collab.
Thanks and happy holidays
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.