Check out example codes for "dicom read with java". It will help you in understanding the concepts better.

Code Example 1

DICOM dcm = new DICOM();
dcm.open("image.dicom");
if (dcm.getWidth()==0)
        IJ.log("Error opening image.dicom");
else
        dcm.show();

Learn ReactJs, React Native from akashmittal.com