Posted by
周鑫 on
Aug 18, 2012; 8:48am
URL: http://imagej.273.s1.nabble.com/How-to-export-images-into-DICOM-in-Java-code-tp4999810.html
Hello Hacklaender,
I'm a developer working with ImageJ for quite a long time.
It was recently that I discovered ImageJ does not have a function like saveAsDicom,
and the only possibility seems to be using plugins such as dcmie or tudordicom......
Both plugins are quite big, with non-necessary code for my research project.
As dcmie requires less third-part dependency, I try to make it work for my project.
I red the Dcm_Export.java and FileExporter.java, but still has no idea about how to make it work.
Suppose that I have two variables, a ImagePlus "imp" which contains the images and a path "path" to save as.
Usually suing FileSaver, it can be done in two lines:
=====================================
FileSaver fs = new FileSaver(imp);
fs.saveAsTiff(path);
=====================================
Now with Dcm_Export, I initialized an instance but did not find one function which deal with the export.
The FileExporter, on the other hand, requires 4 variables, which are not trivial to obtain from my point of view.
Could you give me a hand?
Best regards, Xin
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html