title: Using dicomwrite with color images
body: <p>I am trying to write a sequence of color images to a dicom file in Matlab. Each image is of type <code>uint16</code>. The sequence is stored in a 4D matrix named <code>output</code> of size 200x360x3x360 (num of rows x num of cols x num of channels x num of images). When I execute <code>dicomwrite(output,'outputfile.dcm')</code>, it gives the following error:</p>
  
  <p><a href="https://i.stack.imgur.com/gt6Rm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gt6Rm.png" alt="enter image description here"></a></p>
  
  <p>It says data bit depth is 8 but I've ensured that each image is 16-bit. Not sure what's going wrong. </p>
  
  <p>The <a href="http://www.mathworks.com/help/images/ref/dicomwrite.html" rel="nofollow noreferrer">documentation</a> for <code>dicomwrite</code> says it can write color images as well. In fact <code>dicomread</code> can read color dicom images such that the size of the matrix which stores the read data is 200x360x3x360. So I guess it should be possible to write color images as well using <code>dicomwrite</code>. Any help in this regard is appreciated. There is a <a href="https://stackoverflow.com/q/8111010/5022962">related post</a> but it doesn't talk about color image sequence.</p>