Difference between revisions of "DICOM"

(Created page with "== How to read DICOM files into ImageJ? == * ImageJ has built-in support for reading some kinds of DICOM files. Try {{bc | File | Open}} and see how it goes. * The Bio-Forma...")
 
(Use HTTPS links where feasible)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{FormatsMenu}}[[wikipedia:DICOM|Digital Imaging and Communications in Medicine (DICOM)]] is a standard for handling, storing, printing, and transmitting information in medical imaging.
 +
 
== How to read DICOM files into ImageJ? ==
 
== How to read DICOM files into ImageJ? ==
 
* ImageJ has built-in support for reading some kinds of DICOM files. Try {{bc | File | Open}} and see how it goes.
 
* ImageJ has built-in support for reading some kinds of DICOM files. Try {{bc | File | Open}} and see how it goes.
 
* The [[Bio-Formats]] plugin supports some kinds of DICOM files, too. Bio-Formats is available in the [[Fiji]] distribution of ImageJ. Try {{bc | File | Import | Bio-Formats}}.
 
* The [[Bio-Formats]] plugin supports some kinds of DICOM files, too. Bio-Formats is available in the [[Fiji]] distribution of ImageJ. Try {{bc | File | Import | Bio-Formats}}.
* The [http://www.santec.lu/project/dicom Tudor Dicom Tools] plugin suite can read and write many kinds of DICOM, and provide some support for working with DICOM metadata structures.
+
* The [http://santec.tudor.lu/project/dicom Tudor Dicom Tools] plugin suite can read and write many kinds of DICOM, and provide some support for working with DICOM metadata structures.
  
 
== How to save DICOM files from ImageJ? ==
 
== How to save DICOM files from ImageJ? ==
The [http://www.santec.lu/project/dicom Tudor Dicom Tools] provide basic support for saving as DICOM.
+
The [http://santec.tudor.lu/project/dicom Tudor Dicom Tools] provide basic support for saving as DICOM.
  
 
== How to work with DICOM headers from a script? ==
 
== How to work with DICOM headers from a script? ==
Line 13: Line 15:
 
importClass(Packages.ij.IJ)
 
importClass(Packages.ij.IJ)
 
importClass(Packages.ij.util.DicomTools)
 
importClass(Packages.ij.util.DicomTools)
imp = IJ.openImage("http://imagej.nih.gov/ij/images/ct.dcm.zip");  
+
imp = IJ.openImage("http://wsr.imagej.net/images/ct.dcm.zip");  
 
studyDescription = DicomTools.getTag(imp, "0008,1030");  
 
studyDescription = DicomTools.getTag(imp, "0008,1030");  
 
imagePosition = DicomTools.getTag(imp, "0020,0032");  
 
imagePosition = DicomTools.getTag(imp, "0020,0032");  
Line 25: Line 27:
  
 
See these [[macro]] functions:
 
See these [[macro]] functions:
* [http://imagej.net/developer/macro/functions.html#getImageInfo getImageInfo()]
+
* [https://imagej.net/developer/macro/functions.html#getImageInfo getImageInfo()]
* [http://imagej.net/developer/macro/functions.html#getInfo getInfo(DICOM_TAG)]
+
* [https://imagej.net/developer/macro/functions.html#getInfo getInfo(DICOM_TAG)]
* [http://imagej.net/developer/macro/functions.html#getMetadata getMetadata("Info")]
+
* [https://imagej.net/developer/macro/functions.html#getMetadata getMetadata("Info")]
  
 
An example using <code>getInfo()</code>:
 
An example using <code>getInfo()</code>:
 
<source lang="javascript">
 
<source lang="javascript">
open("http://imagej.nih.gov/ij/images/ct.dcm.zip");  
+
open("http://wsr.imagej.net/images/ct.dcm.zip");  
 
studyDescription = getInfo("0008,1030");  
 
studyDescription = getInfo("0008,1030");  
 
imagePosition = getInfo("0020,0032");  
 
imagePosition = getInfo("0020,0032");  
Line 47: Line 49:
 
* 2012-04-19 - [http://imagej.1557.x6.nabble.com/Accessing-a-DICOM-header-tt4898551.html Accessing a DICOM header]
 
* 2012-04-19 - [http://imagej.1557.x6.nabble.com/Accessing-a-DICOM-header-tt4898551.html Accessing a DICOM header]
 
* 2012-04-13 - [http://imagej.1557.x6.nabble.com/Query-Dicom-Header-tp4877985.html Query Dicom Header]
 
* 2012-04-13 - [http://imagej.1557.x6.nabble.com/Query-Dicom-Header-tp4877985.html Query Dicom Header]
 +
 +
[[Category:Import-Export]]

Latest revision as of 11:54, 24 January 2020

Formats
Bio-Formats
Video formats
QuickTime
TIFF
PDF
DICOM
Zeiss LSM
Olympus VSI
Opera Flex
All I/O plugins

Digital Imaging and Communications in Medicine (DICOM) is a standard for handling, storing, printing, and transmitting information in medical imaging.

How to read DICOM files into ImageJ?

  • ImageJ has built-in support for reading some kinds of DICOM files. Try File  › Open and see how it goes.
  • The Bio-Formats plugin supports some kinds of DICOM files, too. Bio-Formats is available in the Fiji distribution of ImageJ. Try File  › Import  › Bio-Formats.
  • The Tudor Dicom Tools plugin suite can read and write many kinds of DICOM, and provide some support for working with DICOM metadata structures.

How to save DICOM files from ImageJ?

The Tudor Dicom Tools provide basic support for saving as DICOM.

How to work with DICOM headers from a script?

An example of using the DicomTools.getTag() method from JavaScript:

importClass(Packages.ij.IJ)
importClass(Packages.ij.util.DicomTools)
imp = IJ.openImage("http://wsr.imagej.net/images/ct.dcm.zip"); 
studyDescription = DicomTools.getTag(imp, "0008,1030"); 
imagePosition = DicomTools.getTag(imp, "0020,0032"); 
pixelSpacing = DicomTools.getTag(imp, "0028,0030"); 
print("Study Description: "+ studyDescription); 
print("Image Position: "+imagePosition); 
print("Pixel Spacing: "+ pixelSpacing); 

How to work with DICOM headers from a macro?

See these macro functions:

An example using getInfo():

open("http://wsr.imagej.net/images/ct.dcm.zip"); 
studyDescription = getInfo("0008,1030"); 
imagePosition = getInfo("0020,0032"); 
pixelSpacing = getInfo("0028,0030"); 
print("Study Description: "+ studyDescription); 
print("Image Position: "+imagePosition); 
print("Pixel Spacing: "+ pixelSpacing);

See also these past threads from the ImageJ mailing list: