title: Assign the Window centre and window width for dicom image
body: <p>I have a Dicom image file in dcm format.In matlab by using <strong>Dicomread</strong> i got image data and by using <strong>dicominfo</strong> i got <strong>window center</strong> and <strong>window width</strong> of that dcm file. Now i want to display the image by using <strong>imshow</strong>  in figure.</p>
  
  <p>My code is below,</p>
  
  <pre><code>ct = dicomread('E:\IM-0001-0001.dcm'); 
  info = dicominfo('E:\IM-0001-0001.dcm');
  figure
  imshow(ct , [info.WindowCenter, info.WindowWidth]);
  </code></pre>
  
  <p>but it gives a error </p>
  
  <blockquote>
  <pre><code> Error using checkDisplayRange (line 20)
  HIGH must be greater than LOW.
  </code></pre>
  </blockquote>
  
  <p>I knew why this error was  came .it occur because of window center value is more than window width.</p>
  
  <p>Now my question is </p>
  
  <p>1.whether my code is right or wrong for assign the Window level and window width for dcm image? </p>
  
  <p>2.How to assign the Window level and window width for dicom image when above condition occur?</p>