How to open the images from JSRT database in ImageJ

I am trying to segment the lungs from the images of JSRT(Japanese Society of Radiological Technology) Database on MATLAB. I have read that the Database includes the manual segmentation from experienced radiologists. I think that that ground truth is encoded in the IMG images of the database. How do I get the ground truth from those images for comparing my result.

Can you post an example image? Without it, you’re basically asking the impossible unless someone has experience with that exact dataset.

I tried attaching the file. But an error message is popping up saying that .img is an un-authorized file type and only .jpg etc are allowed.

You can try to archive it into a zip file and/or dump it in a file sharing service (Dropbox, GDrive, mediafire, imgur &c) and post a link.

Yes. I have shared two images from the Database.

This is the link to the database :slight_smile:

Hello, please find here two possible approaches for reading JSRT images:

  1. (Python only) Read the images by using the following commands:
import numpy as np
from skimage.util import invert

raw_image = np.fromfile('<path_to_IMG>', dtype=">i2").reshape((2048, 2048)).astype('uint16')  # laod image
img = invert(raw_image)

Note that this will result in a uint16 image

  1. Another approach is to open all images with FIJI (using Raw File Opener Plugin), and Saving all images with Save All plugin. These images will be stored in TIFF format. Then, import those images and invert them. Example in python (can also be done similarly in MATLAB):
from import imread
from skimage.util import invert

img_raw = imread('<path_to_TIF>')
img = invert(img_raw)

As in the previous option, this will yield a uint16 image.

Both options yield the exact same image. The following joint histogram and a test performed with numpy.array_equal verifies this.