%global _empty_manifest_terminate_build 0
Name:		python-ic-slide
Version:	1.1.0
Release:	1
Summary:	api of coriander slides, communicate with private cloud slides.
License:	MIT License
URL:		https://www.intemedic.com
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/a3/83/5ee79f0016b159790f65dce236f12ea0bd93cc3dffe408f46613bdc770ed/ic_slide-1.1.0.tar.gz
BuildArch:	noarch

Requires:	python3-requests
Requires:	python3-Pillow
Requires:	python3-numpy

%description
## Project description

ic_slide is a sdk wrapper for coriander project of intemedic.it providers slide apis for python projects of internal company. It can not used for public domains.

## Installing

Install and update using `pip`:

```bash
pip install -U ic_slide
```

## A Simple Example

sample of open-slide.

```python
from ic_slide import open_slide
# open a slide with slide id.
slide_id = '4395d816-2832-e7b7-6472-39f9b9f93480'
open_slide(slide_id)

# get metadata of slide.
metadata = slide.metadata

# get tile image (PIL.Image) of slide with x=0, y=0, width=512, height=512
tile = slide.read_region(0,0,512,512)
```

sample of enumerate tiles to a slide.

```python
from ic_slide import enumerate_tiles
import numpy as np
# enumerate tiles from begin to stop with specified stride and size.
slide_id = '4395d816-2832-e7b7-6472-39f9b9f93480'
iterated_tiles = enumerate_tiles(slide_id, [0,0], [8192,8192], 400, [512,512])

for tile in iterated_tiles:
    do_something(tile)
```

sample of enumerate slide entries of private cloud.

```python
from ic_slide import get_slide_entries

#get all slide entries
slide_entries = get_slide_entries()
for entry in slide_entries:
    print(entry.Name)

```

sample of get distinct slide id of private cloud.

```python
from ic_slide import get_distinct_slide_ids
slide_ids = get_distinct_slide_ids()

for slide_id in slide_ids():
    do_something(slide_id)
```

sample of get annotations of slide entry.

```python
from ic_slide import get_slide_entries, get_slide_entry_annotations


#get all slide entries
slide_entries = get_slide_entries()
for entry in slide_entries:
    entry_id = entry.Id
    annotations = get_slide_entry_annotations(entry_id)
```




%package -n python3-ic-slide
Summary:	api of coriander slides, communicate with private cloud slides.
Provides:	python-ic-slide
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-ic-slide
## Project description

ic_slide is a sdk wrapper for coriander project of intemedic.it providers slide apis for python projects of internal company. It can not used for public domains.

## Installing

Install and update using `pip`:

```bash
pip install -U ic_slide
```

## A Simple Example

sample of open-slide.

```python
from ic_slide import open_slide
# open a slide with slide id.
slide_id = '4395d816-2832-e7b7-6472-39f9b9f93480'
open_slide(slide_id)

# get metadata of slide.
metadata = slide.metadata

# get tile image (PIL.Image) of slide with x=0, y=0, width=512, height=512
tile = slide.read_region(0,0,512,512)
```

sample of enumerate tiles to a slide.

```python
from ic_slide import enumerate_tiles
import numpy as np
# enumerate tiles from begin to stop with specified stride and size.
slide_id = '4395d816-2832-e7b7-6472-39f9b9f93480'
iterated_tiles = enumerate_tiles(slide_id, [0,0], [8192,8192], 400, [512,512])

for tile in iterated_tiles:
    do_something(tile)
```

sample of enumerate slide entries of private cloud.

```python
from ic_slide import get_slide_entries

#get all slide entries
slide_entries = get_slide_entries()
for entry in slide_entries:
    print(entry.Name)

```

sample of get distinct slide id of private cloud.

```python
from ic_slide import get_distinct_slide_ids
slide_ids = get_distinct_slide_ids()

for slide_id in slide_ids():
    do_something(slide_id)
```

sample of get annotations of slide entry.

```python
from ic_slide import get_slide_entries, get_slide_entry_annotations


#get all slide entries
slide_entries = get_slide_entries()
for entry in slide_entries:
    entry_id = entry.Id
    annotations = get_slide_entry_annotations(entry_id)
```




%package help
Summary:	Development documents and examples for ic-slide
Provides:	python3-ic-slide-doc
%description help
## Project description

ic_slide is a sdk wrapper for coriander project of intemedic.it providers slide apis for python projects of internal company. It can not used for public domains.

## Installing

Install and update using `pip`:

```bash
pip install -U ic_slide
```

## A Simple Example

sample of open-slide.

```python
from ic_slide import open_slide
# open a slide with slide id.
slide_id = '4395d816-2832-e7b7-6472-39f9b9f93480'
open_slide(slide_id)

# get metadata of slide.
metadata = slide.metadata

# get tile image (PIL.Image) of slide with x=0, y=0, width=512, height=512
tile = slide.read_region(0,0,512,512)
```

sample of enumerate tiles to a slide.

```python
from ic_slide import enumerate_tiles
import numpy as np
# enumerate tiles from begin to stop with specified stride and size.
slide_id = '4395d816-2832-e7b7-6472-39f9b9f93480'
iterated_tiles = enumerate_tiles(slide_id, [0,0], [8192,8192], 400, [512,512])

for tile in iterated_tiles:
    do_something(tile)
```

sample of enumerate slide entries of private cloud.

```python
from ic_slide import get_slide_entries

#get all slide entries
slide_entries = get_slide_entries()
for entry in slide_entries:
    print(entry.Name)

```

sample of get distinct slide id of private cloud.

```python
from ic_slide import get_distinct_slide_ids
slide_ids = get_distinct_slide_ids()

for slide_id in slide_ids():
    do_something(slide_id)
```

sample of get annotations of slide entry.

```python
from ic_slide import get_slide_entries, get_slide_entry_annotations


#get all slide entries
slide_entries = get_slide_entries()
for entry in slide_entries:
    entry_id = entry.Id
    annotations = get_slide_entry_annotations(entry_id)
```




%prep
%autosetup -n ic-slide-1.1.0

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-ic-slide -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Tue May 30 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.0-1
- Package Spec generated