Skip to content

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

Description

@OriKovacsiKatz

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/<USER NAME>/Data/Melanoma_WSI/H&E/20241027/"
TARGET_DIRECTORY=r"/home/<USER NAME>/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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions