CellProfiler / python-bioformats

Read and write life sciences file formats
Other
125 stars 45 forks source link

It´s related about .ndpi file extension? #138

Open Yuvi-416 opened 3 years ago

Yuvi-416 commented 3 years ago

Hello everyone, I have a .ndpi image of around 4 and 5 GB. Each image has 9 level_count (from 1.0 to 256.0) with 3 channel (c) each and 11 slices per channel (Z-stack). So, it means: 1 count or series has 3 channel with 11 (Z) per slice = total 33 images. I can visualize all this information using ImageJ or Fiji software. I can also load the image in python using the openslide-python library or bioformats.ImageReader, using it I can see, dimensions, level_dimnesions, and etc. My questions:

  1. My aim is to extract each count or series with their respective each Channel and each Z slices. So in my case for 1 series —3 channel ---- 11 slices per channel (33). (I want to extract 33 images per each 9 count or series). How can I achieve it using openslide library or a bioformats in python?
  2. I can see (c) channel and (Z-stack) slices notation for these images in an ImageJ software, but I couldn´t find these Z-stack or C-channel notation in python while using openslide or bioformats library. So how to solve this problem?

How to load big image at a once using bioformats? I have devoted lots of my time to solve this but I didn´t succeed. So any help would be appreciated. Thank you.

code: javabridge.start_vm(class_path=bioformats.JARS, max_heap_size="9G")

with bioformats.ImageReader(input_any1) as reader: x_dim, y_dim, C_channel, Time_series, Z_stack = reader.rdr.getSizeX(), reader.rdr.getSizeY(), reader.rdr.getSizeC(), reader.rdr.getSizeT(), reader.rdr.getSizeZ() reader.rdr.getImageCount() reader.rdr.getDimensionOrder() reader.rdr.getMetadata()

print(x_dim, y_dim)

Any help would be appreciated.