Menu

Save as myDicom

There are many cases where either a new ImageJ dataset is generated or an existing one needs to be saved, with or without changes. It needs to be stored in Dicom format. If it is to be saved without changes, the existing SOPInstanceUIDs are used. If there are changes new SOPInstancesUIDs will be generated.

The key to indicate if changes are made is the series name. If the series name is left blank or unchanged, the existing name and seriesUID are used. If the series name is different, it is an indication that a new series will be generated with a new seriesUID.

There is a dictionary of Dicom tags which are used. Anything not in the dictionary is ignored. For example most private tags are ignored. If there is a particular set of Dicom tags which you need and which are not included, I can be contacted at ilan.tal@gmail.com. It is possible that sample data will be needed.

The program can be operated in either the dialog mode or in the macro mode.

Dialog mode

Look in the menu under File -> Save as -> myDicom... The currently chosen ImageJ dataset will be used to save as Dicom. This looks like:

The series name is taken from the current study. If it is changed, a new seriesUID will be generated.

The series number is often visible in choosing series. So it is possible the change the name and/or the number, in which case a new seriesUID will be generated.

There is Patient data in an enclosed box. If anything is changed within this box it will also cause a new seriesUID to be generated. There is a Use previous button. A typical study will contain several series. The first series in the study will have to be manually modified with the correct data. To avoid typos, all the remaining series can just use the Use previous to duplicate the correct entries.

In the above example Birth date is empty. This will cause it to have a null value in the dicom output. If you know what the correct value is, enter it in the dicom format of YYYYMMDD.

The path defines where the data is written. The previously used path will be used as a starting point. In most cases it is probably not necessary to change the path. Different series will be automatically placed in different subdirectories.

There is Browse button to help define the path where the data will be stored. The Browse button will only be used for special purpose paths. The path chosen will be remembered for the next time around.

More commonly the is a spinner control will be used. In most cases there will be a strong correlation to the path of myDicom and Save Significant Image. The spinner will automatically pick up one of the predefined Significant Image paths, defined in Options. This can be used to easily swap the destination path.

Note that using the spinner control will overwrite any special purpose path you may have defined by the Browse button.

Notice that in this example the entire path is not visible. Like all dialogs, this one too can be enlarged so that the entire path will be visible. When you are satisfied with the series name and path, press Save Dicom.

Macro mode

The save as Dicom can also be run inside a macro. If correct parameters are given no dialog will appear. Two parameters are expected: series name<tab>path. The tab character separates the parameters. As with the Dialog case, if the series name is the same as the original series name, no new SOPInstanceUIDs nor seriesUID will be generated.

Here we will give an example where a different series name is used causing the generation of new UIDs. In this example we want to generate the new series in the same parent folder as the current image. The macro will include:

path1 = getDirectory("image");
par1 = File.getParent(path1);
run("myDicom...", "modified bone " + par1);

The new series name is "modified bone". It is followed by a tab and then the path to the parent directory. (If you wish to use the original series name without explicitly stating it, you can use <space><tab>path.)

In the Dialog mode there is a default path which can be used. In the Macro mode the path must be explicitly given. Likewise a series name must be explicitly given, or a space used. Only if the specified name is different from the existing name will new UIDs be generated.

Note: myDicom is part of the Nuclear Medicine plugin at Gastric_Emptying.jar

Help list


Related

Wiki: Options
Wiki: Pet Ct Viewer Help
Wiki: Save Significant Image