From 8479f514938954349f293e5d6c685410c9ca2cd0 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 4 Oct 2022 13:06:57 -0700 Subject: [PATCH 1/4] Symlink top-level README & CHANGELOG into cucim Should cutdown on duplication of this content. --- python/cucim/CHANGELOG.md | 167 +--------------------------------- python/cucim/README.md | 185 +------------------------------------- 2 files changed, 2 insertions(+), 350 deletions(-) mode change 100644 => 120000 python/cucim/CHANGELOG.md mode change 100644 => 120000 python/cucim/README.md diff --git a/python/cucim/CHANGELOG.md b/python/cucim/CHANGELOG.md deleted file mode 100644 index deff519e8..000000000 --- a/python/cucim/CHANGELOG.md +++ /dev/null @@ -1,166 +0,0 @@ - -# Changelog (See [Release Notes](https://github.com/rapidsai/cucim/wiki/Release-Notes)) - -## [22.08.01](https://github.com/rapidsai/cucim/wiki/release_notes_v22.08.01) - -- Euclidean distance transform: fix bad choice of block parameters ([#393](https://github.com/rapidsai/cucim/pull/393)) [@grlee77](https://github.com/grlee77)) - -## [22.08.00](https://github.com/rapidsai/cucim/wiki/release_notes_v22.08.00) - -## 🚨 Breaking Changes - -- Stain extraction: use a less strict condition across channels when thresholding ([#316](https://github.com/rapidsai/cucim/pull/278)) [@grlee77](https://github.com/grlee77) - -## πŸ› Bug Fixes - -- create SimilarityTransform using CuPy 9.x-compatible indexing ([#365](https://github.com/rapidsai/cucim/pull/365)) [@grlee77](https://github.com/grlee77) -- Add `__init__.py` in `cucim.core` ([#359](https://github.com/rapidsai/cucim/pull/359)) [@jakirkham](https://github.com/jakirkham) -- Stain extraction: use a less strict condition across channels when thresholding ([#316](https://github.com/rapidsai/cucim/pull/316)) [@grlee77](https://github.com/grlee77) -- Incorporate bug fixes from skimage 0.19.3 ([#312](https://github.com/rapidsai/cucim/pull/312)) [@grlee77](https://github.com/grlee77) -- fix RawKernel bug for canny filter when quantiles are used ([#310](https://github.com/rapidsai/cucim/pull/310)) [@grlee77](https://github.com/grlee77) - -## πŸ“– Documentation - -- Defer loading of `custom.js` ([#383](https://github.com/rapidsai/cucim/pull/383)) [@galipremsagar](https://github.com/galipremsagar) -- add cucim.core.morphology to API docs + other docstring fixes ([#367](https://github.com/rapidsai/cucim/pull/367)) [@grlee77](https://github.com/grlee77) -- Update README.md ([#361](https://github.com/rapidsai/cucim/pull/361)) [@HesAnEasyCoder](https://github.com/HesAnEasyCoder) -- remove unimplemented functions from See Also and fix version numbers in deprecation warnings ([#356](https://github.com/rapidsai/cucim/pull/356)) [@grlee77](https://github.com/grlee77) -- Forward-merge branch-22.06 to branch-22.08 ([#344](https://github.com/rapidsai/cucim/pull/344)) [@grlee77](https://github.com/grlee77) -- Update README.md ([#315](https://github.com/rapidsai/cucim/pull/315)) [@HesAnEasyCoder](https://github.com/HesAnEasyCoder) -- Update index.rst ([#314](https://github.com/rapidsai/cucim/pull/314)) [@HesAnEasyCoder](https://github.com/HesAnEasyCoder) -- Update PyPI package documentation for v22.06.00 ([#311](https://github.com/rapidsai/cucim/pull/311)) [@gigony](https://github.com/gigony) - -## πŸš€ New Features - -- Add segmentation with the Chan-Vese active contours method ([#343](https://github.com/rapidsai/cucim/pull/343)) [@grlee77](https://github.com/grlee77) -- Add cucim.skimage.morphology.medial_axis ([#342](https://github.com/rapidsai/cucim/pull/342)) [@grlee77](https://github.com/grlee77) -- Add cucim.skimage.segmentation.expand_labels ([#341](https://github.com/rapidsai/cucim/pull/341)) [@grlee77](https://github.com/grlee77) -- Add Euclidean distance transform for images/volumes ([#318](https://github.com/rapidsai/cucim/pull/318)) [@grlee77](https://github.com/grlee77) - -## πŸ› οΈ Improvements - -- Revert "Allow CuPy 11" ([#362](https://github.com/rapidsai/cucim/pull/362)) [@galipremsagar](https://github.com/galipremsagar) -- Fix issues with day & night modes in python docs ([#360](https://github.com/rapidsai/cucim/pull/360)) [@galipremsagar](https://github.com/galipremsagar) -- Allow CuPy 11 ([#357](https://github.com/rapidsai/cucim/pull/357)) [@jakirkham](https://github.com/grlee77) -- more efficient separable convolution ([#355](https://github.com/rapidsai/cucim/pull/355)) [@grlee77](https://github.com/grlee77) -- Support resolution and spacing metadata ([#349](https://github.com/rapidsai/cucim/pull/349)) [@gigony](https://github.com/gigony) -- Performance optimizations to morphological segmentation functions ([#340](https://github.com/rapidsai/cucim/pull/340)) [@grlee77](https://github.com/grlee77) -- benchmarks: avoid use of deprecated pandas API ([#339](https://github.com/rapidsai/cucim/pull/339)) [@grlee77](https://github.com/grlee77) -- Reduce memory overhead and improve performance of normalize_colors_pca ([#328](https://github.com/rapidsai/cucim/pull/328)) [@grlee77](https://github.com/grlee77) -- Protect against obscure divide by zero error in edge case of `normalize_colors_pca` ([#327](https://github.com/rapidsai/cucim/pull/327)) [@grlee77](https://github.com/grlee77) -- complete parametrization of cucim.skimage benchmarks ([#324](https://github.com/rapidsai/cucim/pull/324)) [@grlee77](https://github.com/grlee77) -- parameterization of `filters` and `features` benchmarks (v2) ([#322](https://github.com/rapidsai/cucim/pull/322)) [@grlee77](https://github.com/grlee77) -- Add a fast histogram-based median filter ([#317](https://github.com/rapidsai/cucim/pull/317)) [@grlee77](https://github.com/grlee77) -- Remove custom compiler environment variables ([#307](https://github.com/rapidsai/cucim/pull/307)) [@ajschmidt8](https://github.com/ajschmidt8) - -## [22.02.06](https://github.com/rapidsai/cucim/wiki/release_notes_v22.06.00) - -- [Update/Breaking] Promote small integer types to single rather than double precision ([#278](https://github.com/rapidsai/cucim/pull/278)) [@grlee77](https://github.com/grlee77) -- [Bug] Populate correct channel names for RGBA image ([#294](https://github.com/rapidsai/cucim/pull/294)) [@gigony](https://github.com/gigony) -- [Bug] Merge branch-22.04 into branch-22.06 ([#258](https://github.com/rapidsai/cucim/pull/258)) [@jakirkham](https://github.com/jakirkham) -- [New] add missing `cucim.skimage.segmentation.clear_border` function ([#267](https://github.com/rapidsai/cucim/pull/267)) [@grlee77](https://github.com/grlee77) -- [New] add `cucim.core.operations.color.stain_extraction_pca` and `cucim.core.operations.color.normalize_colors_pca` for digital pathology H&E stain extraction and normalization ([#273](https://github.com/rapidsai/cucim/pull/273)) [@grlee77](https://github.com/grlee77), [@drbeh](https://github.com/drbeh) -- [Update] Update to use DLPack v0.6 ([#295](https://github.com/rapidsai/cucim/pull/295)) [@gigony](https://github.com/gigony) -- [Update] Remove plugin-related messages temporarily ([#291](https://github.com/rapidsai/cucim/pull/291)) [@gigony](https://github.com/gigony) -- [Update] Simplify recipes ([#286](https://github.com/rapidsai/cucim/pull/286)) [@Ethyling](https://github.com/Ethyling) -- [Update] Use cupy.fuse to improve efficiency hessian_matrix_eigvals ([#280](https://github.com/rapidsai/cucim/pull/280)) [@grlee77](https://github.com/grlee77) -- [Update] improve efficiency of histogram-based thresholding functions ([#276](https://github.com/rapidsai/cucim/pull/276)) [@grlee77](https://github.com/grlee77) -- [Update] Remove unused dependencies in GPU tests job ([#268](https://github.com/rapidsai/cucim/pull/268)) [@Ethyling](https://github.com/Ethyling) -- [Update] Enable footprint decomposition for morphology ([#274](https://github.com/rapidsai/cucim/pull/274)) [@grlee77](https://github.com/grlee77) -- [Update] Use conda compilers ([#232](https://github.com/rapidsai/cucim/pull/232)) [@Ethyling](https://github.com/Ethyling) -- [Update] Build packages using mambabuild ([#216](https://github.com/rapidsai/cucim/pull/216)) [@Ethyling](https://github.com/Ethyling) -- [Doc] update outdated links to example data ([#289](https://github.com/rapidsai/cucim/pull/289)) [@grlee77](https://github.com/grlee77) -- [Doc] Add missing API docs ([#275](https://github.com/rapidsai/cucim/pull/275)) [@grlee77](https://github.com/grlee77) - -## [22.02.04](https://github.com/rapidsai/cucim/wiki/release_notes_v22.04.00) - -- [Bug] Fix ImportError from vendored code ([#252](https://github.com/rapidsai/cucim/pull/252)) [@grlee77](https://github.com/grlee77) -- [Bug] Fix wrong dimension in metadata ([#248](https://github.com/rapidsai/cucim/pull/248)) [@gigony](https://github.com/gigony) - -## [22.02.01](https://github.com/rapidsai/cucim/wiki/release_notes_v22.02.01) - -- [Bug] Check nullptr of handler in CuFileDriver::close() ([#229](https://github.com/rapidsai/cucim/pull/229)) [@gigony](https://github.com/gigony) -- [Bug] Handle file descriptor ownership and update documents for GDS ([#234](https://github.com/rapidsai/cucim/pull/234)) [@gigony](https://github.com/gigony) -- [Bug] Apply fixes to skimage.transform scheduled for scikit-image 0.19.2 ([#208](https://github.com/rapidsai/cucim/pull/208)) [@grlee7](https://github.com/grlee7) -- [New] Randomization of transforms per image per batch ([#231](https://github.com/rapidsai/cucim/pull/231)) [@shekhardw](https://github.com/shekhardw) -- [New] Expose data type of CuImage object for interoperability with NumPy ([#246](https://github.com/rapidsai/cucim/pull/246)) [@gigony](https://github.com/gigony) -- [Update] Remove verbose plugin messages temporarily. Address [#109](https://github.com/rapidsai/cucim/issues/109) ([BUG] - Info messages appearing as warnings in Jupyter notebooks) -- [Doc] Fix docs builds ([#218](https://github.com/rapidsai/cucim/pull/218)) [@ajschmidt8](https://github.com/ajschmidt8) -- [Doc] Update GTC 2021 Spring video links ([#227](https://github.com/rapidsai/cucim/pull/227)) [@gigony](https://github.com/gigony) -- [Doc] Update documents for v22.02.00 ([#226](https://github.com/rapidsai/cucim/pull/226)) [@gigony](https://github.com/gigony) - -## [22.02.00](https://github.com/rapidsai/cucim/wiki/release_notes_v22.02.00) - -- [New/Breaking] Update cucim.skimage API to match scikit-image 0.19 ([#190](https://github.com/rapidsai/cucim/pull/190)) [@glee77](https://github.com/glee77) -- [Bug] Fix a bug in [v21.12.01](https://github.com/rapidsai/cucim/wiki/release_notes_v21.12.01) ([#191](https://github.com/rapidsai/cucim/pull/191)) [@gigony](https://github.com/gigony) - - Fix GPU memory leak when using nvJPEG API (when `device='cuda'` parameter is used in `read_region` method). -- [Bug] Fix segfault for preferred_memory_capacity in Python 3.9+ ([#214](https://github.com/rapidsai/cucim/pull/214)) [@gigony](https://github.com/gigony) -- [Doc] PyPI v21.12.00 release ([#182](https://github.com/rapidsai/cucim/pull/182)) [@gigony](https://github.com/gigony) -- [New] Allow CuPy 10 ([#195](https://github.com/rapidsai/cucim/pull/195)) [@jakikham](https://github.com/jakikham) -- [New] Support multi-threads and batch, and support nvJPEG for JPEG-compressed images ([#191](https://github.com/rapidsai/cucim/pull/191)) [@gigony](https://github.com/gigony) -- [New] Update cucim.skimage API to match scikit-image 0.19 ([#190](https://github.com/rapidsai/cucim/pull/190)) [@glee77](https://github.com/glee77) -- [Update] Add missing imports tests ([#183](https://github.com/rapidsai/cucim/pull/183)) [@Ethyling](https://github.com/Ethyling) -- [Update] Allow installation with CuPy 10 ([#197](https://github.com/rapidsai/cucim/pull/197)) [@glee77](https://github.com/glee77) -- [Update] Upgrade Numpy to 1.18 for Python 3.9 support ([#196](https://github.com/rapidsai/cucim/pull/196)) [@Ethyling](https://github.com/Ethyling) -- [Update] Upgrade Numpy to 1.19 for Python 3.9 support ([#203](https://github.com/rapidsai/cucim/pull/203)) [@Ethyling](https://github.com/Ethyling) - -## [21.12.01](https://github.com/rapidsai/cucim/wiki/release_notes_v21.12.01) - -- [New] Supporting Multithreading and Batch Processing ([#149](https://github.com/rapidsai/cucim/issues/149)) [@gigony](https://github.com/gigony) - -## [21.12.00](https://github.com/rapidsai/cucim/wiki/release_notes_v21.12.00) - -- [New] Support Aperio SVS with CPU LZW and jpeg2k decoder ([#141](https://github.com/rapidsai/cucim/pull/141)) [@gigony](https://github.com/gigony) -- [New] Add NVTX support for performance analysis ([#144](https://github.com/rapidsai/cucim/pull/144)) [@gigony](https://github.com/gigony) -- [New] Normalize operation ([#150](https://github.com/rapidsai/cucim/pull/150)) [@shekhardw](https://github.com/shekhardw) -- [Bug] Load libcufile.so with RTLD_NODELETE flag ([#177](https://github.com/rapidsai/cucim/pull/177)) [@gigony](https://github.com/gigony) -- [Bug] Remove rmm/nvcc dependencies to fix cudaErrorUnsupportedPtxVersion error ([#175](https://github.com/rapidsai/cucim/pull/175)) [@gigony](https://github.com/gigony) -- [Bug] Do not compile code with nvcc if no CUDA kernel exists ([#171](https://github.com/rapidsai/cucim/pull/171)) [@gigony](https://github.com/gigony) -- [Bug] Fix a segmentation fault due to unloaded libcufile ([#158](https://github.com/rapidsai/cucim/pull/158)) [@gigony](https://github.com/gigony) -- [Bug] Fix thread contention in Cache ([#145](https://github.com/rapidsai/cucim/pull/145)) [@gigony](https://github.com/gigony) -- [Bug] Build with NumPy 1.17 ([#148](https://github.com/rapidsai/cucim/pull/148)) [@jakirkham](https://github.com/jakirkham) -- [Doc] Add Jupyter notebook for SVS Support ([#147](https://github.com/rapidsai/cucim/pull/147)) [@gigony](https://github.com/gigony) -- [Doc] Update change log for v21.10.01 ([#142](https://github.com/rapidsai/cucim/pull/142)) [@gigony](https://github.com/gigony) -- [Doc] update docs theme to pydata-sphinx-theme ([#138](https://github.com/rapidsai/cucim/pull/138)) [@quasiben](https://github.com/quasiben) -- [Doc] Update Github links in README.md through script ([#132](https://github.com/rapidsai/cucim/pull/132)) [@gigony](https://github.com/gigony) -- [Doc] Fix GDS link in Jupyter notebook ([#131](https://github.com/rapidsai/cucim/pull/131)) [@gigony](https://github.com/gigony) -- [Doc] Update notebook for the interoperability with DALI ([#127](https://github.com/rapidsai/cucim/pull/127)) [@gigony](https://github.com/gigony) -- [Update] Update `conda` recipes for Enhanced Compatibility effort by ([#164](https://github.com/rapidsai/cucim/pull/164)) [@ajschmidt8](https://github.com/ajschmidt8) -- [Update] Fix Changelog Merge Conflicts for `branch-21.12` ([#156](https://github.com/rapidsai/cucim/pull/156)) [@ajschmidt8](https://github.com/ajschmidt8) -- [Update] Add cucim.kit.cumed plugin with skeleton ([#129](https://github.com/rapidsai/cucim/pull/129)) [@gigony](https://github.com/gigony) -- [Update] Update initial cpp unittests ([#128](https://github.com/rapidsai/cucim/pull/128)) [@gigony](https://github.com/gigony) -- [Update] Optimize zoom out implementation with separate padding kernel ([#125](https://github.com/rapidsai/cucim/pull/125)) [@chirayuG-nvidia](https://github.com/chirayuG-nvidia) -- [Update] Do not force install linux-64 version of openslide-python ([#124](https://github.com/rapidsai/cucim/pull/124)) [@Ethyling](https://github.com/Ethyling) - -## [21.10.01](https://github.com/rapidsai/cucim/wiki/release_notes_v21.10.01) - -- [New] Support Aperio SVS with CPU LZW and jpeg2k decoder ([#141](https://github.com/rapidsai/cucim/pull/141)) - -## [21.10.00](https://github.com/rapidsai/cucim/wiki/release_notes_v21.10.00) - -- [New] Add transforms for Digital Pathology ([#100](https://github.com/rapidsai/cucim/pull/100)) [@shekhardw](https://github.com/shekhardw) [@chirayuG-nvidia](https://github.com/chirayuG-nvidia) -- [New] Enable GDS and Support Runtime Context (__enter__, __exit__) for CuFileDriver and CuImage ([#106](https://github.com/rapidsai/cucim/pull/106)) [@gigony](https://github.com/gigony) -- [New] Add a mechanism for user to know the availability of cucim.CuImage ([#107](https://github.com/rapidsai/cucim/pull/107)) [@gigony](https://github.com/gigony) -- [New] Support raw RGB tiled TIFF ([#108](https://github.com/rapidsai/cucim/pull/108)) [@gigony](https://github.com/gigony) -- [Bug] fix failing regionprops test cases ([#110](https://github.com/rapidsai/cucim/pull/110)) [@grlee77](https://github.com/grlee77) -- [Doc] Forward-merge branch-21.08 to branch-21.10 ([#88](https://github.com/rapidsai/cucim/pull/88)) [@jakirkham](https://github.com/jakirkham) -- [Doc] Update PyPI cuCIM v21.08.01 README.md and CHANGELOG.md ([#87](https://github.com/rapidsai/cucim/pull/87)) [@gigony](https://github.com/gigony) -- [Update] ENH Replace gpuci_conda_retry with gpuci_mamba_retry ([#69](https://github.com/rapidsai/cucim/pull/69)) [@dillon-cullinan](https://github.com/dillon-cullinan) - -## [21.08.02](https://github.com/rapidsai/cucim/wiki/release_notes_v21.08.02) - -- [New] Add transforms for Digital Pathology ([#100](https://github.com/rapidsai/cucim/pull/100)) [@shekhardw](https://github.com/shekhardw) [@chirayuG-nvidia](https://github.com/chirayuG-nvidia) - -## [21.08.01](https://github.com/rapidsai/cucim/wiki/release_notes_v21.08.01) - -- [New] Add skimage.morphology.thin ([#27](https://github.com/rapidsai/cucim/pull/27)) -- [Bug] Fix missing `__array_interface__` for associated_image(): ([#48](https://github.com/rapidsai/cucim/pull/48), [#65](https://github.com/rapidsai/cucim/pull/65)) -- [Testing] Added unit and performance tests for TIFF loaders ([#62](https://github.com/rapidsai/cucim/pull/62)) -- [Bug] Fix Windows int-type Bug: ([#72](https://github.com/rapidsai/cucim/pull/72)) -- [Update] Use more descriptive ElementwiseKernel names in cucim.skimage: ([#75](https://github.com/rapidsai/cucim/pull/75)) - -## [21.06.00](https://github.com/rapidsai/cucim/wiki/release_notes_v21.06.00) - -- Implement cache mechanism -- Add `__cuda_array_interface`. -- Fix a memory leak in Deflate decoder. diff --git a/python/cucim/CHANGELOG.md b/python/cucim/CHANGELOG.md new file mode 120000 index 000000000..699cc9e7b --- /dev/null +++ b/python/cucim/CHANGELOG.md @@ -0,0 +1 @@ +../../CHANGELOG.md \ No newline at end of file diff --git a/python/cucim/README.md b/python/cucim/README.md deleted file mode 100644 index b69e73c84..000000000 --- a/python/cucim/README.md +++ /dev/null @@ -1,184 +0,0 @@ -# [cuCIM](https://github.com/rapidsai/cucim) - - - -[RAPIDS](https://rapids.ai) [cuCIM](https://github.com/rapidsai/cucim) is an extensible toolkit designed to provide GPU accelerated I/O, computer vision & image processing primitives for N-Dimensional images with a focus on biomedical imaging. - -**NOTE:** For the latest stable [README.md](https://github.com/rapidsai/cucim/blob/main/README.md) ensure you are on the `main` branch. - -- [GTC 2022 Accelerating Storage IO to GPUs with Magnum IO [S41347]](https://events.rainfocus.com/widget/nvidia/gtcspring2022/sessioncatalog/session/1634960000577001Etxp) - - cuCIM's GDS API examples: -- [SciPy 2021 cuCIM - A GPU image I/O and processing library](https://www.scipy2021.scipy.org/) - - [video](https://youtu.be/G46kOOM9xbQ) -- [GTC 2021 cuCIM: A GPU Image I/O and Processing Toolkit [S32194]](https://www.nvidia.com/en-us/on-demand/search/?facet.mimetype[]=event%20session&layout=list&page=1&q=cucim&sort=date) - - [video](https://www.nvidia.com/en-us/on-demand/session/gtcspring21-s32194/) - - -## Quick Start - -### Install cuCIM - -```bash -pip install cucim - -# Install dependencies for `cucim.skimage` (assuming that CUDA 11.0 is used for CuPy) -pip install scipy scikit-image cupy-cuda110 -``` - -### Jupyter Notebooks - -Please check out our [Welcome](https://github.com/rapidsai/cucim/blob/branch-22.10/notebooks/Welcome.ipynb) notebook. - -### Open Image - -cuCIM's dataloader(`cucim.CuImage` class) is currently supporting Digital-pathology specific image formats (tiled multi-resolution raw/deflate/lzw/JPEG/JPEG2000-compressed TIFF-like RGB images such as Generic TIFF, Philips TIFF, Aperio SVS format). - -```python -from cucim import CuImage -img = CuImage('image.tif') -``` - -### See Metadata - -```python -import json -print(img.is_loaded) # True if image data is loaded & available. -print(img.device) # A device type. -print(img.ndim) # The number of dimensions. -print(img.dims) # A string containing a list of dimensions being requested. -print(img.shape) # A tuple of dimension sizes (in the order of `dims`). -print(img.size('XYC')) # Returns size as a tuple for the given dimension order. -print(img.dtype) # The data type of the image. -print(img.channel_names) # A channel name list. -print(img.spacing()) # Returns physical size in tuple. -print(img.spacing_units()) # Units for each spacing element (size is same with `ndim`). -print(img.origin) # Physical location of (0, 0, 0) (size is always 3). -print(img.direction) # Direction cosines (size is always 3x3). -print(img.coord_sys) # Coordinate frame in which the direction cosines are - # measured. Available Coordinate frame is not finalized yet. - -# Returns a set of associated image names. -print(img.associated_images) -# Returns a dict that includes resolution information. -print(json.dumps(img.resolutions, indent=2)) -# A metadata object as `dict` -print(json.dumps(img.metadata, indent=2)) -# A raw metadata string. -print(img.raw_metadata) -``` - -### Read Region - -```python -# Install matplotlib (`pip install matplotlib`) if not installed before. -from matplotlib import pyplot as plt -def visualize(image): - dpi = 80.0 - height, width, _ = image.shape - plt.figure(figsize=(width / dpi, height / dpi)) - plt.axis('off') - plt.imshow(image) - -``` - -```python -import numpy as np - -# Read whole slide at the highest resolution -resolutions = img.resolutions -level_count = resolutions['level_count'] # level: 0 ~ (level_count - 1) - -# Note: β€˜level’ is at 3rd parameter (OpenSlide has it at 2nd parameter) -# `location` is level-0 based coordinates (using the level-0 reference frame) -# If `size` is not specified, size would be (width, height) of the image at the specified `level`. -region = img.read_region(location=(5000, 5000), size=(512, 512), level=0) - -visualize(region) -#from PIL import Image -#Image.fromarray(np.asarray(region)) -``` - -Aperio SVS (.svs) image format is supported since cuCIM [v21.10.01](https://github.com/rapidsai/cucim/wiki/release_notes_v21.10.01#support-aperio-svs-svs). - -Please check [this notebook](https://nbviewer.org/github/rapidsai/cucim/blob/branch-22.10/notebooks/Supporting_Aperio_SVS_Format.ipynb) to see how to use the feature. - -### Using Cache - -Please look at this [notebook](https://nbviewer.jupyter.org/github/rapidsai/cucim/blob/branch-22.10/notebooks/Using_Cache.ipynb). - -### Accessing File with GDS - -Please look at this [notebook](https://nbviewer.jupyter.org/github/rapidsai/cucim/blob/branch-22.10/notebooks/Accessing_File_with_GDS.ipynb). - -### NVTX Support for Performance Analysis - -Please look at [this release note](https://github.com/rapidsai/cucim/wiki/release_notes_v21.12.00#2-add-nvtx-support-for-performance-analysis). - -### Supporting Multithreading and Batch Processing - -Please look at [this release note](https://github.com/rapidsai/cucim/wiki/release_notes_v22.02.00#2-supporting-multithreading-and-batch-processing). - -### Using scikit-image API - -Import `cucim.skimage` instead of `skimage`. - -```python -# The following code is modified from https://scikit-image.org/docs/dev/auto_examples/color_exposure/plot_ihc_color_separation.html#sphx-glr-auto-examples-color-exposure-plot-ihc-color-separation-py -# -import cupy as cp # modified from: `import numpy as np` -import matplotlib.pyplot as plt - -# from skimage import data -from cucim.skimage.color import rgb2hed, hed2rgb # modified from: `from skimage.color import rgb2hed, hed2rgb` - -# Load image (You can download sample images from https://openslide.cs.cmu.edu/download/openslide-testdata/Aperio/) -from cucim import CuImage -img = CuImage("CMU-1.svs") -region = img.read_region((30000, 10000), (256, 256)) - -# Example IHC image -ihc_rgb = cp.asarray(region) # modified from: `ihc_rgb = data.immunohistochemistry()` - -# Separate the stains from the IHC image -ihc_hed = rgb2hed(ihc_rgb) - -# Create an RGB image for each of the stains -null = cp.zeros_like(ihc_hed[:, :, 0]) # np -> cp -ihc_h = hed2rgb(cp.stack((ihc_hed[:, :, 0], null, null), axis=-1)) # np -> cp -ihc_e = hed2rgb(cp.stack((null, ihc_hed[:, :, 1], null), axis=-1)) # np -> cp -ihc_d = hed2rgb(cp.stack((null, null, ihc_hed[:, :, 2]), axis=-1)) # np -> cp - -# Display -fig, axes = plt.subplots(2, 2, figsize=(7, 6), sharex=True, sharey=True) -ax = axes.ravel() - -ax[0].imshow(ihc_rgb.get()) # appended `.get()` -ax[0].set_title("Original image") - -ax[1].imshow(ihc_h.get()) # appended `.get()` -ax[1].set_title("Hematoxylin") - -ax[2].imshow(ihc_e.get()) # appended `.get()` -ax[2].set_title("Eosin") - -ax[3].imshow(ihc_d.get()) # appended `.get()` -ax[3].set_title("DAB") - -for a in ax.ravel(): - a.axis('off') - -fig.tight_layout() -``` - -## Acknowledgments - -Without awesome third-party open source software, this project wouldn't exist. - -Please find `LICENSE-3rdparty.md` to see which third-party open source software -is used in this project. - -## License - -Apache-2.0 License (see `LICENSE` file). - -Copyright (c) 2020-2022, NVIDIA CORPORATION. diff --git a/python/cucim/README.md b/python/cucim/README.md new file mode 120000 index 000000000..fe8400541 --- /dev/null +++ b/python/cucim/README.md @@ -0,0 +1 @@ +../../README.md \ No newline at end of file From 1354b26cff8676506c08af035a4a7666afdca4bf Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 4 Oct 2022 13:13:48 -0700 Subject: [PATCH 2/4] Move `summary` field next to `home` --- conda/recipes/cucim/meta.yaml | 2 +- conda/recipes/libcucim/meta.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/recipes/cucim/meta.yaml b/conda/recipes/cucim/meta.yaml index 89d9f1461..3557dbfb2 100644 --- a/conda/recipes/cucim/meta.yaml +++ b/conda/recipes/cucim/meta.yaml @@ -52,7 +52,7 @@ tests: # [linux64] about: home: http://rapids.ai/ + summary: cucim Python package license: Apache-2.0 license_family: Apache license_file: LICENSE - summary: cucim Python package diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index 554841b83..df6d26b09 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -45,7 +45,7 @@ requirements: about: home: http://rapids.ai/ + summary: libcucim C++ library license: Apache-2.0 license_family: Apache license_file: LICENSE - summary: libcucim C++ library From 4b844a50799dd621597fcd302f78047ce99f2697 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 4 Oct 2022 13:32:27 -0700 Subject: [PATCH 3/4] Link home page, repo, and docs --- conda/recipes/cucim/meta.yaml | 4 +++- conda/recipes/libcucim/meta.yaml | 4 +++- python/cucim/setup.py | 7 ++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/conda/recipes/cucim/meta.yaml b/conda/recipes/cucim/meta.yaml index 3557dbfb2..ef99c96a3 100644 --- a/conda/recipes/cucim/meta.yaml +++ b/conda/recipes/cucim/meta.yaml @@ -51,8 +51,10 @@ tests: # [linux64] - cucim # [linux64] about: - home: http://rapids.ai/ + home: https://developer.nvidia.com/multidimensional-image-processing summary: cucim Python package license: Apache-2.0 license_family: Apache license_file: LICENSE + doc_url: https://docs.rapids.ai/api/cucim/stable/ + dev_url: https://github.com/rapidsai/cucim diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index df6d26b09..e98674826 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -44,8 +44,10 @@ requirements: - libwebp-base # [linux or osx] about: - home: http://rapids.ai/ + home: https://developer.nvidia.com/multidimensional-image-processing summary: libcucim C++ library license: Apache-2.0 license_family: Apache license_file: LICENSE + doc_url: https://docs.rapids.ai/api/cucim/stable/ + dev_url: https://github.com/rapidsai/cucim diff --git a/python/cucim/setup.py b/python/cucim/setup.py index cdff432e8..57e390ad9 100755 --- a/python/cucim/setup.py +++ b/python/cucim/setup.py @@ -36,7 +36,7 @@ def read(*names, **kwargs): ), long_description_content_type='text/markdown', author='NVIDIA Corporation', - url='https://github.com/rapidsai/cucim', + url='https://developer.nvidia.com/multidimensional-image-processing', packages=find_packages('src'), package_dir={'cucim': 'src/cucim'}, include_package_data=True, @@ -73,8 +73,9 @@ def read(*names, **kwargs): 'Topic :: Scientific/Engineering :: Image Processing', ], project_urls={ - 'Documentation': 'https://cucim.readthedocs.io/', - 'Changelog': 'https://cucim.readthedocs.io/en/latest/changelog.html', + 'Source': 'https://github.com/rapidsai/cucim', + 'Documentation': 'https://docs.rapids.ai/api/cucim/stable/', + 'Changelog': 'https://github.com/rapidsai/cucim/blob/main/CHANGELOG.md', 'Issue Tracker': 'https://github.com/rapidsai/cucim/issues', }, keywords=[ From 7cc4605dec3f0e0c465b55ff6b3e7990f6f20f5e Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 4 Oct 2022 14:19:10 -0700 Subject: [PATCH 4/4] Bump year in README copyright --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index de83e019a..b4e6ffc79 100644 --- a/README.md +++ b/README.md @@ -110,4 +110,4 @@ is used in this project. Apache-2.0 License (see [LICENSE](LICENSE) file). -Copyright (c) 2020-2021, NVIDIA CORPORATION. +Copyright (c) 2020-2022, NVIDIA CORPORATION.