Using negative threshold values for lung CT analysis

I’m currently developing a project using open source ImageJ software to measure pulmonary vessel volume and prognosticate outcomes in patients with pulmonary fibrosis. I have been trying to follow the Matsuoka et al. protocol described in the literature (pertinent screenshot attached) however I have run into an issue which I have not been able to solve by myself or with my own resources.

The protocol calls for thresholding measured in HU (e.g. “Set Lower Threshold to -1024, Upper Threshold to -500”). Unfortunately within ImageJ thresholding is not measured in Hounsfield units, and setting negative thresholds are not possible. A similar issue arises when I try “windowing” - the images are supposed to be windowed at -720 HU however again that is not the scale provided by the software for my use.

I’m certain our issue is in my own understanding of how to use ImageJ and the biomedical imaging software. I have seen similar questions posted however have not found useful answers in the past. Any help is much appreciated

1 Like

Can you load the images as 32bit? The 16bit format that you are using is unsigned

1 Like

Further to Gabriel’s reply, this seems to me to be a simple pixel value mapping issue, i.e. if you can figure out what pixel value represents e.g. a Hounsfield unit of -500 and -1024, you should be able to set the appropriate thresholds (an unsigned 16-bit image should not have negative values and as such the negative Hounsfied units should be represented by positive pixel values on your images).

Hi @taylory,

as @gabriel pointed out correctly, loading the images is key. I assume you’re working with DICOM files. There is a website guiding you in working with them in ImageJ:

I personally recommend using BioFormats to open these files. That might mean you need to switch from ImageJ to Fiji:

Let us know if this helps!

Cheers,
Robert

I appreciate all of your assistance very much. I am certainly not good with technology in any way and tips or ideas are welcome.
I am using the Bioformats plug-in to import my DICOM images into ImageJ
I tried making it 32 bit as suggested but unfortunately was still not able to set the threshold to “negative values” as suggested in the protocol.
I have included more text from the Matsuoka et al publication I am trying to replicate if that stimulates any ideas, as well as a screen shot of my latest trial with a 32 bit image.

Matsuoka_screenshot
Thanks for your time!

I suspect that your problem is due to the fact that your image doesn’t actually contain any negative values. Have you checked the minimum and maximum pixel values in your images? A simple way of seeing the pixel distribution is to use Analyze -> Histogram. If your image doesn’t contain negative values, setting negative thresholds wouldn’t make any sense.
If you expect he image to contain negative pixel values, a lack of negative values maybe related to the way the image was opened.
If your images are not too large, it would be useful if you could post an actual image rather than just a screenshot.
Regards,
Volko

1 Like

I think so, too. However, it should as lung tissue has negative Hounsfield units in CT imaging. Would be good to find a way to import the images correctly…

I appreciate all of your thoughts,

There are no negative values in the ImageJ histogram (consist with not allowing me to set negative thresholds) and we definitely would expect there to be some so it certainly may be the way the image is getting imported though the Bioformats plug-in…

Does anyone know how I can upload a DICOM image for you all to look at? This way I can give an example of what I’m trying to import into ImageJ and analyze.

I have uploaded a sample DICOM image to a Dropbox folder.
Here is the link.


Thanks!

I am not able to download this file. It says “downloads disabled”. I am, however, able to set the threshold of a 16-bit CT DICOM to the range -1025 to -500, but I had to disable “Don’t reset range”.

Screenshot

I think I have fixed the link to make the CT scan downloadable

And unfortunately I tried your technique of disabling “Don’t reset range” and still had no success. Here is a screenshot of what I end up with…I try to set the thresholds I want but the scale just automatically sets both upper and lower limits to 0

I was able to import your image with Bioformats and it seems to load it as 16 bit unsigned, so it does not have negative values.

Perhaps you need to calibrate it based on the information in the header you can see calling Image>Show Info…

[…]
0028,0004 Photometric Interpretation #1 = MONOCHROME2
0028,0010 Rows #1 = 512
0028,0011 Columns #1 = 512
0028,0030 Pixel Spacing #1 = 0.810546875\0.810546875
0028,0100 Bits Allocated #1 = 16
0028,0101 Bits Stored #1 = 12
0028,0102 High Bit #1 = 11
0028,0103 Pixel Representation #1 = 0
0028,1050 Window Center #1 = -450-450
0028,1051 Window Width #1 = 1500\1500
0028,1052 Rescale Intercept #1 = -1024
0028,1053 Rescale Slope #1 = 1

This indicates that the pixel values should be negative. Might this be a bug in #BioFormats? cc @joshmoore (-:

1 Like

I am now able to download the file (“00000048”) but ImageJ’s built in DICOM reader cannot open it because it is compressed and the Bio-Formats plugin does not open it and does not display an error message. Is it possible to get an uncompressed version? ImageJ would probably open it correctly if it were uncompressed.

Herbie sent me a TIFF version of the image that he was able to open using the Bio-formats plugin. I was able to segment it to -1024 to -500 by converting to 32-bits (Image>Type>32-bits), subtracting 1024 (Process>Math>Subtract) and using the “Set” function of the Threshold tool.

Ooops, sorry. @haesleinhuepf. I missed your comment. I’ve added the #bio-formats tag. ~J.

@taylory, sorry Im just seeing this thread now as the bio-formats tag was added. In order to investigate the bug in the Bio-Formats reader would it be possible to re-upload the sample file to https://www.openmicroscopy.org/qa2/qa/feedback/?status=1 (the existing link seems to have expired)