Module ij
Package ij.plugin

Class DICOM

  • All Implemented Interfaces:
    Measurements, PlugIn, java.awt.image.ImageObserver, java.lang.Cloneable

    public class DICOM
    extends ImagePlus
    implements PlugIn
    This plugin decodes DICOM files. If 'arg' is empty, it displays a file open dialog and opens and displays the image selected by the user. If 'arg' is a path, it opens the specified image and the calling routine can display it using "((ImagePlus)IJ.runPlugIn("ij.plugin.DICOM", path)).show()".
    • Constructor Detail

      • DICOM

        public DICOM()
        Default constructor.
      • DICOM

        public DICOM​(java.io.InputStream is)
        Constructs a DICOM reader that using an InputStream. Here is an example that shows how to open and display a DICOM:
                        DICOM dcm = new DICOM(is);
                        dcm.run("Name");
                        dcm.show();
                        
      • DICOM

        public DICOM​(java.io.BufferedInputStream bis)
        Constructs a DICOM reader that using an BufferredInputStream.
    • Method Detail

      • run

        public void run​(java.lang.String arg)
        Description copied from interface: PlugIn
        This method is called when the plugin is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt.
        Specified by:
        run in interface PlugIn
      • open

        public void open​(java.lang.String path)
        Opens the specified file as a DICOM. Does not display a message if there is an error. Here is an example:
                        DICOM dcm = new DICOM();
                        dcm.open(path);
                        if (dcm.getWidth()==0)
                                IJ.log("Error opening '"+path+"'");
                        else
                                dcm.show();
                        
      • getInfo

        public java.lang.String getInfo​(java.lang.String path)
        Returns the DICOM tags of the specified file as a string.
      • getTagName

        public static java.lang.String getTagName​(java.lang.String id)
        Returns the name of the specified DICOM tag id.