-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hello!
I have taken interferometric images with phasics SID4BIO camera using NIKONs NIS-elements software. I have successfully converted the interferometric images into phase and intensity images using MATLAB. I have then stacked the phase and intensity images using python , into a similar format as the PHASICS "SID PHA" format. However, drymass/qpformat can not seem to find my images with the command dm_convert.
This the code i use to convert my data to a TIF-stack:
from skimage import data, io, filters
from skimage.transform import resize
import numpy as np
import tifffile
#Read Intensity and Pahse tif images
inte = io.imread('Intensity.tif')
inte = resize(inte, (800, 864))
print(inte.shape)
print(inte.dtype)
phas = io.imread('Phase.tif')
phas = resize(phas, (800, 864))
print(phas.shape)
print(phas.dtype)
#Normalize with max of image
maxinte= np.max(inte)
maxphas=np.max(phas)
inte=inte/maxinte
phas=phas/maxphas
print('max Intensity :',np.max(inte))
print('max Phase :',np.max(phas))
#Create stack of Intensity and Phase data
stack=np.array([inte,phas,phas])
print(stack.shape)
print(stack.dtype)
#save images, in two formats.
tifffile.imwrite('sensor_data.tif',stack)
tifffile.imwrite('multi-channel_resized.tif', stack,photometric='minisblack', metadata={'axes': 'IYX'})
And this is the error in the anaconda prompt:
(Master) C:\Users\samue\Documents\Master-Thesis\Pyhton\Test\160922-Bild-strack>dm_convert test
DryMass version 0.12.0
Traceback (most recent call last):
File "C:\Users\samue\anaconda3\envs\Master\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\samue\anaconda3\envs\Master\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\samue\anaconda3\envs\Master\Scripts\dm_convert.exe\__main__.py", line 7, in <module>
File "C:\Users\samue\anaconda3\envs\Master\lib\site-packages\drymass\cli\converting.py", line 15, in cli_convert
path_in, path_out = dialog.main(path=path,
File "C:\Users\samue\anaconda3\envs\Master\lib\site-packages\drymass\cli\dialog.py", line 110, in main
ds = qpformat.load_data(path_in)
File "C:\Users\samue\anaconda3\envs\Master\lib\site-packages\qpformat\core.py", line 73, in load_data
fmt = guess_format(path)
File "C:\Users\samue\anaconda3\envs\Master\lib\site-packages\qpformat\core.py", line 13, in guess_format
if fmt.verify(path):
File "C:\Users\samue\anaconda3\envs\Master\lib\site-packages\qpformat\file_formats\fmts_ready\series_phase_phasics_tif_zip.py", line 85, in verify
zf = zipfile.ZipFile(path)
File "C:\Users\samue\anaconda3\envs\Master\lib\zipfile.py", line 1248, in __init__
self.fp = io.open(file, filemode)
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\samue\\Documents\\Master-Thesis\\Pyhton\\Test\\160922-Bild-strack\\test'
Metadata
Metadata
Assignees
Labels
No labels