ImageJ plugin to calculate a variance or signal-to-noise map of a digital x-ray image
ImageJ plugin to calculate a variance or signal-to-noise map of a digital x-ray image

Category: Diagnostic Imaging
Author’s Name: David Platten,  
Published: May 20, 2013

ImageJ plugin to calculate a variance or signal-to-noise map of a digital x-ray image.

The routine will run on a user-selected rectangular region of interest (ROI). If no ROI is selected then the whole image is selected and analysed.

ImageJ plugin to calculate a variance or signal-to-noise map of a digital x-ray image.

The routine will run on a user-selected rectangular region of interest (ROI). If no ROI is selected then the whole image is selected and analysed.

It breaks the large ROI into smaller square ROIs, and calculates the chosen statistical parameter for each region. The user is asked to supply the side-length of the smaller ROIs (in mm).

The routine calculates variance as:
sum[x – mean(x)] / n

The routine calculates standard deviation as:
sqrt(variance)

The routine calculates signal-to-noise as:
mean(x) / standard deviation(x)

ImageJ macro to help with DR system uniformity measurement
ImageJ macro to help with DR system uniformity measurement

Category: Diagnostic Imaging
Author’s Name: David Platten,  
Published: Oct 08, 2010

An ImageJ macro that will draw five rectangular regions of interest on an image and write the mean pixel values out to the results table. There is one central region and one in each corner.

The user can specify the size of the ROIs in mm, and also specify how far from the edge of the image the other ROIs are positioned.

ImageJ macro to help with DR system transfer properties
ImageJ macro to help with DR system transfer properties

Category: Diagnostic Imaging
Author’s Name: David Platten,  
Published: Wed Oct 06, 2010

An ImageJ macro. Point it to a directory of files and it’ll calculate the mean pixel value from a central region of interest and report this in a table.

The user can choose the size of the region (mm). The macro tries to read the pixel size from the DICOM tags, but the user can specify a value instead.

The results can be saved as a .csv file and opened in Excel.

I find this useful when determining the signal transfer properties of a CR or DDR system.

ImageJ macro to determine the helical slice thickness of a CT scan
ImageJ macro to determine the helical slice thickness of a CT scan

Category: Diagnostic Imaging
Author’s Name: David Platten
Published: Oct 08, 2010

An ImageJ macro that determines the slice thickness of a helical CT scan by analysing a directory of DICOM images from a helical scan through a thin gold disc phantom or very small metal bead.

The macro expects a directory of DICOM images from a helical scan run through a thin metal disc or a very small metal bead. The reconstruction interval should be around 1/10 of the slice thickness. For example, if the reconstructed slice thickness is 3 mm then you need to set the reconstruction interval to 0.3 mm.

The phantom can be a thin gold disc embedded in a Perspex rod, similar to the one that ImPACT uses. Alternatively the method may work by scanning through a small metal bead, provided that the bead is much smaller than the reconstructed slice thickness.

Calculates the FWHM by finding the bead or disc position then measuring the CT# of it. The FWHM is taken as the difference between min and max CT# values. Note – this may not be a correct assumption for your scan! Note – this will only work well if the contrast between the bead or disc CT # and background is high – use a very small bead / disc roi to help with this.

ImageJ macro to calculate CT helical slice thickness – new version
ImageJ macro to calculate CT helical slice thickness – new version

Category: Diagnostic Imaging
Author’s Name: David Platten,  
Published: May 20, 2013

An ImageJ macro to calculate the helical slice thickness from a CT scan along a rod containing a thin gold disc. The method is based on that used by ImPACT. Note: this macro may not work correctly on a bead embedded in a large phantom.

Expects a directory of DICOM images from a helical scan run through a thin metal disc or a very small metal bead. The reconstruction interval should be around 1/10 of the slice thickness. For example, if the reconstructed slice thickness is 3 mm then you need to set the reconstruction interval to 0.3 mm.

The phantom can be a thin gold disc embedded in a Perspex rod, similar to the one that ImPACT uses. Alternatively the method may work by scanning through a small metal bead, provided that the bead is much smaller than the reconstructed slice thickness. However, the routine may fail with this type of test object as it tries to locate the centre of the test object using a centre-of-mass calculation; this may result in the incorrect positioning of the ROI if the test object occupies the whole image.

For each image in the series the centre of mass of pixels that have a value of >= max / 2 is calculated. A circular ROI is then centred at this position and the mean pixel value calculated. The z-position of the image is recorded. Once all images have been examined, the background is subtracted from every point (actually the minimum mean ROI value), and then the values are normaised to the maximum value. The full-width at half-maximum of the profile is then calculated.

There can be “.txt”, “.csv” or “dcminf” files in the directory with your images, but nothing else. Any other file in the directory will cause the routine to fail.

Example images and MTF, NNPS and DQE analysis results
Example images and MTF, NNPS and DQE analysis results

Category: Diagnostic Imaging
Author’s Name: David Platten,  
Published: Nov 01, 2012

DICOM images of a tungsten edge and flat-field for MTF, NNPS and DQE analysis, together with MTF and NNPS results from three different software packages: IQWorks 0.6, OBJ_IQ_reduced_v2 and my own IDL routine. DQE results from IDL too.

DICOM images of a tungsten edge and flat-field for MTF, NNPS and DQE analysis, together with MTF and NNPS results from three different software packages: IQWorks 0.6, OBJ_IQ_reduced_v2 and my own IDL routine. DQE results from IDL too.

Others can download the image and analyse it with their own software and then compare the results.

Batch file to write specific DICOM tags out into a .txt file
Batch file to write specific DICOM tags out into a .txt file

Category: Diagnostic Imaging
Author’s Name: David Platten,
Published: Oct 08, 2010

A batch file to write specific DICOM tags into a text file with the same name as the original image file. Requires the Offis DICOM tool kit and a Windows computer.

AB batch file to write specifc DICOM tags into a text file. The text file has the same name as the original image but with a .txt extension.

Requires the Offis DICOM tool kit to be installed (http://dicom.offis.de/dcmtk.php.en). Will only work on a Windows computer.

It looks for files with the extension .dcm and creates a decompressed copy of all files with that extension that it finds in the directory.

You’ll need to change the file extension of the downloaded file from .txt to .bat. You may also need to edit the file and provide the full path to dcmdump.exe, part of the Offis DICOM toolkit.

You’ll need to manually add the tags that you want written out. Change the ones that are already there if you like, or add more.

To use, drag a directory containing DICOM images onto the batch file using Windows Explorer.

Batch file to create jpg thumbnails of DICOM images
Batch file to create jpg thumbnails of DICOM images

Category: Diagnostic Imaging
Author’s Name: David Platten,    
Published: Oct 08, 2010

A DOS batch file to create jpg thumbnails of a whole directory of DICOM images. Requires ImageMagick (http://www.imagemagick.org/) to be installed, making use of the mogrify.exe command.

You’ll need to change the extension of the downloaded file to .bat from .txt for Windows to recognise it as a batch file.

You may need to edit the file and put the full path to “mogrify.exe” in for it to work.

To use, open Windows Explorer and drag a directory of DICOM files on top of the batch file. It should then produce small jpg versions in the same directory as the original files.

Batch file to create decompressed DICOM images
Batch file to create decompressed DICOM images

Category: Diagnostic Imaging
Author’s Name: David Platten,  
Published: Oct 08, 2010

A batch file to help with decompressing whole directories of compressed DICOM images. Requires the Offis DICOM tool kit and a Windows computer.

A batch file to help with decompressing whole directories of compressed DICOM images. My copy of ImageJ can’t read compressed DICOM files, so I run the images through this first.

Requires the Offis DICOM tool kit to be installed (http://dicom.offis.de/dcmtk.php.en). Will only work on a Windows computer.

It looks for files with the extension .dcm and creates a decompressed copy of all files with that extension that it finds in the directory.

You’ll need to change the file extension of the downloaded file from .txt to .bat. You may also need to edit the file and provide the full path to dcmdjpeg.exe, part of the Offis DICOM toolkit.

To use, drag a directory containing DICOM images onto the batch file using Windows Explorer.