title: Error getting ImageReader parsing DICOM image
body: <p>I try to implement sample piece of code to get image from DicomObject:</p>
  
  <pre><code>import java.awt.image.BufferedImage;
  import java.io.BufferedOutputStream;
  import java.io.ByteArrayInputStream;
  import java.io.ByteArrayOutputStream;
  import java.io.IOException;
  import java.util.Iterator;
  import javax.imageio.ImageIO;
  import javax.imageio.ImageReader;
  import javax.imageio.stream.ImageInputStream;
  import org.dcm4che2.data.DicomObject;
  import org.dcm4che2.imageio.plugins.dcm.DicomImageReadParam;
  import org.dcm4che2.io.DicomOutputStream;
  
  ....
  
  public static BufferedImage getPixelDataAsBufferedImage(byte[] dicomData)
          throws IOException {
      ByteArrayInputStream bais = new ByteArrayInputStream(dicomData);
      BufferedImage buff = null;
      Iterator&lt;ImageReader&gt; iter = ImageIO.getImageReadersByFormatName("DICOM");
      ImageReader reader = (ImageReader) iter.next();
      DicomImageReadParam param = (DicomImageReadParam) reader.getDefaultReadParam();
      ImageInputStream iis = ImageIO.createImageInputStream(bais);
      reader.setInput(iis, false);
      buff = reader.read(0, param);
      iis.close();
      if (buff == null) {
          throw new IOException("Could not read Dicom file. Maybe pixel data is invalid.");
      }
      return buff;
  }
  </code></pre>
  
  <p>When ImageReader reader = (ImageReader) iter.next(); I got:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/media/imageio/stream/StreamSegmentMapper
  at org.dcm4che2.imageioimpl.plugins.dcm.DicomImageReaderSpi.createReaderInstance(DicomImageReaderSpi.java:146)
  at javax.imageio.spi.ImageReaderSpi.createReaderInstance(ImageReaderSpi.java:320)
  at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:529)
  at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:513)
  at dcm4.dcmTools.loadImage(dcmTools.java:61)
  at dcm4.Dcm4.main(Dcm4.java:87)
  Caused by: java.lang.ClassNotFoundException: com.sun.media.imageio.stream.StreamSegmentMapper
  at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
  ... 6 more
  </code></pre>
  
  <p>Does anyone knows What is wrong??? I use JDK7 64 on Windows7 64</p>