- Create a virtual environment
conda create --name my_env_name python=3.8
or whatever Python version you may need.
- List available envs (2 different ways
conda env list
conda info --envs
- Activate virtual env
conda activate my_env_name
- Deactivate current environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tifffile import TiffFile | |
import numpy as np | |
def get_crop(page, i0, j0, h, w): | |
"""Extract a crop from a TIFF image file directory (IFD). | |
Only the tiles englobing the crop area are loaded and not the whole page. | |
This is usefull for large Whole slide images that can't fit int RAM. |