NDPI file - How to convert to TIFF without loosing resolution

Hello guys,

I am writing again about an issue.
I have many digital slides obtained with a Nanozoomer digital slide scanner c10730-12, Hamamatsu with a 40x objective (0.228 μm/pixel). I am analyzing these slide (adipocyte count) with a commercial software that it is able to work with NDPI file at the highest resolution (from 2 to 6-7 gb).

But to add robustness to my analysis, I want to test other two software (Adiposoft and Adipocount).
The problem is that this two software work with TIFF format.
So, my question there is an easy way to convert NDPI to TIFF without loosing resolution?
I tried to use a macro (see below, suggested by an user of this forum). It works well, but split the original image in 3 images (single channel). If I upload one of this image in the commercial software I am using, the resolution is changed (0.913 μm/pixel instead the original 0.228 μm/pixel).
Moreover, Adipocount is not able to work with this “new” images.

I think that changing in resolution can seriously affect the computation of area and diameter of each single adipocyte giving different measurements. So, I am looking for an easy way to not introduce bias from the beginning with resolution and format.

Many thanks for your help.

for (i=0; i<list.length; i++)
{
if (endsWith(list[i], “.ndpi”)>0) //for .ndpi files
{
path= dir+"\"+list[i];
NameImg = list[i];

  Ext.setId(path);
  Ext.getSeriesCount(seriesCount);

  for (s=0; s<seriesCount; s++)
  {
     Ext.setSeries(s);
     Ext.getSizeX(sizeX);
     Ext.getSizeY(sizeY);
     Ext.getSeriesName(NameSerie);
     Index = indexOf(NameSerie, "Series " + numSerie);

     if (Index >= 0) //this is the good series
     {
        run("Bio-Formats Importer", "open=[" + path + "] autoscale color_mode=Default split_channels view=Hyperstack stack_order=XYCZT series_" + numSerie);

   selectImage(NameImg + " - Series " + numSerie + " - C=0");
   rename("C0");
   selectImage(NameImg + " - Series " + numSerie + " - C=1");
       rename("C1");
       selectImage(NameImg + " - Series " + numSerie + " - C=2");
   rename("C2");
     }
  }

}
}
Ext.close();

Dear @InfiniteJest,
you might try the bfconvert tool, e.g.
bfconvert -tilex 512 -tiley 512 -compression JPEG -pyramid-scale 2 -noflat input.ndpi output.ome.tif

to create a pyramidal tiled tiff image (I assume your software needs a pyramidal tiff).
If your images are >4GB you might want to use the BigTiff format, see discussion here.

Regards,
Manuel

1 Like

Thanks manuel @mstritt
What I need it is not necessarily the whole image. Just a part of the original image could be fine.
I tried to use bioformat plugin in ImageJ, but I obtain 3-single channel images. But I can’t use use a single channel image in one of the software I am testing.

To give an idea of the image on I am working I attached one. I need to crop a part of this NDPI image and convert in TIFF, possibly maintaining the original resolution. But half of the original resolution could be fine. Some idea?

Many thanks in advance

I solved the problem in a apparently easy way.
Using QuPath, I selected the region of interest with the draw tool and then I sent the region to ImageJ (function in QuPAth). In ImageJ I saved the crop image in TIFF et voila’. The new image has the same resolution of the original image (microns/pixels).
Of course, It works only with small regions, but for the moment is what I need.

Regards

Edoardo

1 Like