Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
I did this under python3.5, which is the default version for python3 in Ubuntu
sudo apt-get install python3-tk
sudo apt-get install libpython3.6-dev
pip3 install matplotlib numpy
then download ASAP from the website:
and install it by the command:
dpkg -i ASAP-1.8-python36-Linux.deb
to find where it was installed, use the command:
dpkg -L asap
Now, we put it in the PYTHONPATH:
now we can begin
type command : python3
then we enter python,
>>>import matplotlib.pyplot as plt
>>> import multiresolutionimageinterface as mir
>>> reader = mir.MultiResolutionImageReader()
>>>mr_image ='/home/wli/Downloads/tumor_036.tif')
>>>tile = mr_image.getUCharPatch(0, 0, dims[0], dims[1], 6)
>>> plt.imshow(tile)
>>> tile =mr_image.getUCharPatch(37000, 90000, 1024, 1024, 0)
>>> plt.imshow(tile)
or using openslide
slide = openslide.open_slide(slide_path)
thumbnail = slide.get_thumbnail((slide.dimensions[0] / 256, slide.dimensions[1] / 256))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment