Problem with creating tiff file montages from Amnis .cif file for CellProfiler

Greetings to image.sc users,

I’am a biologist trying to follow the protocol for IFC data analysis published in a paper by Henning et. al with a further step-by-step explanation from CellProfiler homepage.

I am stuck at the montage creation step with Python after successful installation of all the modules with pip and trying to run the stitching.

I provide the ‘stitching command’: python stitching -o path/to/OUTPUT_DIRECTORY path/to/IMAGE

in my case - python stitching -o C:\Users\a\amnis\output C:\Users\a\amnis\example.cif

And this is what I get:

Traceback (most recent call last):
File “C:\Python27\lib\runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “C:\Python27\lib\runpy.py”, line 72, in run_code
exec code in run_globals
File "C:\Users\a\amnis\stitching-master\stitching_main
.py", line 13, in
import skimage.util.montage
ImportError: No module named montage

Unfortunately I don’t have programming background, but I assume some of the packages have been changed to newer version, which make the original code unable to find the module needed for stitching.

Could that be the case? And could someone suggest a solution for the problem.

Best,
Vadim

What version of skimage are you running? If you’re not suer, you can tell by typing pip freeze into your console.

Hey,

Here is the full list and it is scikit image 0.14.1

backports.functools-lru-cache==1.5
boto3==1.9.63
botocore==1.12.63
Click==7.0
cloudpickle==0.6.1
cycler==0.10.0
Cython==0.29.1
dask==1.0.0
decorator==4.3.0
docutils==0.14
future==0.17.1
futures==3.2.0
javabridge==1.0.18
jmespath==0.9.3
kiwisolver==1.0.1
matplotlib==2.2.3
networkx==2.2
numpy==1.15.4
Pillow==5.3.0
pyparsing==2.3.0
python-bioformats==1.5.2
python-dateutil==2.7.5
pytz==2018.7
PyWavelets==1.0.1
s3transfer==0.1.13
scikit-image==0.14.1
scipy==1.1.0
six==1.12.0
stitching==1.0.0
toolz==0.9.0
urllib3==1.24.1

Can you try editing line 13 in __main__ from

import skimage.util.montage

to

from skimage.util import montage

I think that will fix your issue, if you can confirm I’ll request the repository be changed so this is fixed for future users too!

1 Like

Thank you. This worked for me. I got the tiff files!