Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using scyjava to convert resolutions pyramid VSI file to tif file resaults with 1/40 resolution layer of the pyramid only. #71

Open
OriKovacsiKatz opened this issue Dec 22, 2024 · 0 comments

Comments

@OriKovacsiKatz
Copy link

Hello
My name is Ori , I am an HPC and AI advisor at the Technion (Research Institute and University)
I advise a researcher and need help with medical imaging Olympus resolution issue:
(continuing my email with Edward Evans suggesting me opening my inquiry to the public eye)
Using imageJ with scyjava to convert VSI (Olympus) images to tif format , provide only a small portion
of the imaging binary data.
Specifically there is some imaging images pyramid where the x40 resolution required so the resulting
image is only X 1/40 of the necessary binary details.

How can I force bio-format convert to export tif image with the x40 zoom size out of the VSI Olympus pyramid?

I use the code:
import imagej
from os import listdir
import numpy as np
import os.path
ij = imagej.init(headless=False)

SOURCE_DIRECTORY=r"/home//Data/Melanoma_WSI/H&E/20241027/"
TARGET_DIRECTORY=r"/home//Data/Melanoma_WSI/H&E/20241027_converted/"
def convertImageToTif(image_name):
image_url=SOURCE_DIRECTORY+ image_name
print("# read image:")
print(image_url)
save_url=TARGET_DIRECTORY+image_name.split('.vsi')[0]+'.tif'
print("# write image:")
print(image_url)
jimage = ij.io().open(image_url)
print("# after opening image...")
ij.io().save(jimage, save_url)
print("# after saving image....")

files = np.array(listdir(SOURCE_DIRECTORY))

files in source which contain ".vsi"

files = files[np.flatnonzero(np.core.defchararray.find(files,'.vsi')!=-1)]
print("# converting files:")
print(files)

for file in files:
convertImageToTif(file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant