title: how to open dicom image using fastai?
body: <p>I am working on Dicom images using pydicom.
  But my project is in <code>fasai</code> and I want to open that Dicom image using the fastai library.
  In <code>fastai</code>, we normally do open_image(path) its work fine for <code>png</code> or <code>jpg</code> but if we have Dicom images we have no method to open it easily. so I use pydicom and them get their pixel array and then convert to <code>RGB and resized. But when I again apply to open that NumPy array which I made it can't open it because open_image needs </code>path` not a numpy image.
  I have a question that how I can open a Dicom image like we open a simple png image.</p>
  <p>we open normal images like in fastai:</p>
  <pre><code>im = open_image(img_path)
  img.show(figsize=(4,4), ax=axs[0])
  </code></pre>
  <p>it gives us shape of <strong>(3,H,W)</strong></p>
  <p>but in Dicom's image, it's not easy to open it as same. I need to open it like before. I tried the below code to get the image using the pydicom library.</p>
  <pre><code>    if (extension == 'dicom'):
      xray = read_xray(img_path)
      img = resize(xray)
      img = to_rgb(img)
      img = normalize(img)
      img = torch.from_numpy(img)
      img = np.transpose(img, [2, 0, 1])
  </code></pre>
  <p>Please help to get of from this probelm.</p>