User Tools

Site Tools


plugin:inputoutput:dicom_open:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
plugin:inputoutput:dicom_open:start [2019/11/17 22:46] fredplugin:inputoutput:dicom_open:start [2019/11/21 07:11] fred
Line 2: Line 2:
 The DICOM_open plugin provides additional functionality on top of the DICOM plugin.  There were three main impetuses for developing this plugin, first was to be able to search the DICOM files for a series to open, second was to open the series and get at the actual voxel data, and, third was to properly arrange the images in a hyperstack.   The DICOM_open plugin provides additional functionality on top of the DICOM plugin.  There were three main impetuses for developing this plugin, first was to be able to search the DICOM files for a series to open, second was to open the series and get at the actual voxel data, and, third was to properly arrange the images in a hyperstack.  
  
-DICOM datasets, that I generally come across, are stored in a hierarchical directory structure in which the directory names do not enlighten the content.  The DICOM files are database entries, and the parameters within hold the clues to which datasets may be desired.  This plugin's GUI provides an interactive interface to find the series of interest to open.  For dealing with a single hodgepodge directory of DICOM files, see DICOM_explode plugin.+DICOM datasets, that I generally come across, are stored in a hierarchical directory structure in which the directory names do not enlighten the content.  The DICOM files are database entries, and the parameters within hold the clues to which datasets may be desired.  This plugin's GUI provides an interactive interface to find the series of interest to open.  For dealing with a single hodgepodge directory of DICOM files, see [[plugin:utilities:dicom_explode:start|DICOM_explode plugin]].
  
 MRI DICOM dataset's voxel data tends to be stored as 16 bit unsigned integers, i.e., magnitude data, albeit, the tags within the DICOM files say they are signed.  ImageJ does not support signed 16 bit image data.  For some reason, they add 32768 to the dataset voxel values and store them in unsigned 16 bit integer ShortProcessor(s); confusing to say the least.  This plugin provides the means to access the voxel data as someone who deals with MRI data would expect. MRI DICOM dataset's voxel data tends to be stored as 16 bit unsigned integers, i.e., magnitude data, albeit, the tags within the DICOM files say they are signed.  ImageJ does not support signed 16 bit image data.  For some reason, they add 32768 to the dataset voxel values and store them in unsigned 16 bit integer ShortProcessor(s); confusing to say the least.  This plugin provides the means to access the voxel data as someone who deals with MRI data would expect.
Line 18: Line 18:
 If the DICOM series is a multi b-value diffusion dataset then use the Pulldown to select the appropriate type "Trace", "R/L", "A/P", "S/I"; DTI is not supported. Supported vendors (0008,0070) are "GE MEDICAL SYSTEMS" and "SIEMENS". Otherwise, if the DICOM series was acquired whilst varying a DICOM tag value, enter the DICOM tag and a variable name to be used in the slice's short label. Neither of these fields are required. If the DICOM series is a multi b-value diffusion dataset then use the Pulldown to select the appropriate type "Trace", "R/L", "A/P", "S/I"; DTI is not supported. Supported vendors (0008,0070) are "GE MEDICAL SYSTEMS" and "SIEMENS". Otherwise, if the DICOM series was acquired whilst varying a DICOM tag value, enter the DICOM tag and a variable name to be used in the slice's short label. Neither of these fields are required.
  
-The **Float** format causes the voxel values to be the same as in the DICOM dataset, albeit, in 32-bit FloatProcessor format.  The **Scaled** format causes the FloatProcessor values to be scaled according to the rescale (0028,1053) and intercept (0028,1052).  The **16-bit fixed** format causes the FloatProcessor values to be directly converted to short(s) and placed in a ShortProcessor, (i.e., Java: (short)floatvalue; not: (ShortProcessor)FloatProcessorValue, n.b., the (ShortProcessor) conversion rescales).  The **16-bit broken** format is as the DICOM plugin imported.+The **Float** format causes the voxel values to be the same as in the DICOM dataset, albeit, in 32-bit FloatProcessor format.  The **Scaled** format causes the FloatProcessor values to be scaled according to the linear rescale (0028,1053) and intercept (0028,1052).  The **16-bit fixed** format causes the FloatProcessor values to be directly converted to short(s) and placed in a ShortProcessor, (i.e., Java: (short)floatvalue; not: (ShortProcessor)FloatProcessorValue, n.b., the (ShortProcessor) conversion rescales).  The **16-bit broken** format is as the DICOM plugin imported.
  
 ==== Methods ==== ==== Methods ====
Line 27: Line 27:
 Return the DICOM tag/value mappings in easy to use format.  The slice ''s'' is as returned by ''ImagePlus.getStackIndex''. Return the DICOM tag/value mappings in easy to use format.  The slice ''s'' is as returned by ''ImagePlus.getStackIndex''.
  
-''public static ImagePlus openDICOMShort(File dfs)''\\ 
-''public static ImagePlus openDICOMShort(File[] dfs)''\\ 
 ''public static ImagePlus openDICOMFloat(File dfs)''\\ ''public static ImagePlus openDICOMFloat(File dfs)''\\
 ''public static ImagePlus openDICOMFloat(File[] dfs)''\\ ''public static ImagePlus openDICOMFloat(File[] dfs)''\\
 ''public static ImagePlus openDICOMScaled(File dfs)''\\ ''public static ImagePlus openDICOMScaled(File dfs)''\\
 ''public static ImagePlus openDICOMScaled(File[] dfs)''\\ ''public static ImagePlus openDICOMScaled(File[] dfs)''\\
-''public static ImagePlus openDICOM(File f, String format)''\\ +''public static ImagePlus openDICOMShort(File dfs)''\\ 
-''public static ImagePlus openDICOM(File[] images, String format)''\\+''public static ImagePlus openDICOMShort(File[] dfs)''\\ 
 +''public static ImagePlus openDICOM(File dfs, String format)''\\ 
 +''public static ImagePlus openDICOM(File[] dfs, String format)''\\
 These methods open a DICOM dataset.  All but the last one are convenience methods that call the last one.  The DICOM dataset is not yet sorted.  With ''File dfs'', ''dfs'' can be either the parent directory of the DICOM files or a single DICOM file.  For ''File[] dfs'', ''dfs'' should be an array of DICOM files. These methods open a DICOM dataset.  All but the last one are convenience methods that call the last one.  The DICOM dataset is not yet sorted.  With ''File dfs'', ''dfs'' can be either the parent directory of the DICOM files or a single DICOM file.  For ''File[] dfs'', ''dfs'' should be an array of DICOM files.
  
Line 47: Line 47:
  
 ''public static ImagePlus[] diffusionDICOM(ImagePlus imp) throws Exception''\\ ''public static ImagePlus[] diffusionDICOM(ImagePlus imp) throws Exception''\\
-Sorts a multi b-value diffusion dataset into a array of 4 hyperstacks, one entry for each of "Trace","R/L","A/P","S/I" Only the array elements that existed in imp are filled in.+Sorts a multi b-value diffusion dataset into a array of 4 hyperstacks, one array element for each of "Trace","R/L","A/P","S/I" Only the array elements that existed in imp are filled in.
  
 ''public static double[]  getArray(ImagePlus imp, int s, String tag)''\\ ''public static double[]  getArray(ImagePlus imp, int s, String tag)''\\
Line 57: Line 57:
  
 ===== Install ===== ===== Install =====
-Place the file {{ :plugin:inputoutput:dicom_open:dicom_open.java |DICOM_open.java}} in your plugins directory, then compile&run; or just place the {{ :plugin:inputoutput:dicom_open:dicom_open.class |DICOM_open.class}} file in your plugins directory and refresh the menus / restart ImageJ.  Note that DICOM should be in uppercase in the file names.+Place the file {{ :plugin:inputoutput:dicom_open:dicom_open.java |}} in your plugins directory, then compile&run; or just place the {{ :plugin:inputoutput:dicom_open:dicom_open.class |}} file in your plugins directory and refresh the menus / restart ImageJ.  **Note that DICOM should be in uppercase in the file names.**
  
 ===== Licence ===== ===== Licence =====
plugin/inputoutput/dicom_open/start.txt · Last modified: 2019/11/21 07:13 by fred

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki