Read dicom file in python by sample ITK
<p>I use simple ITK for read dicom file but I do not know how to show it into a QLabel.</p>

<pre><code>reader = SimpleITK.ImageFileReader()
reader.SetFileName("M:\\CT-RT DICOM\ct\\CT111253009007.dcm")
image1 = reader.Execute()
</code></pre>

<p>How can I show image1 in QLabel?</p>

<p>Maybe something like this? It should generate a QImage which you can then pass into the QLabel. </p>

<p>A few catch-me's will be the 16 bit image data (I assume) from the DICOM which needs passed into the RGB image. Further the scaling of the image. But this should be enough to get you started</p>

<pre><code>from PySide import QtGui
width,height = img.GetSize()

img = QtGui.QImage(width, height, QtGui.QImage.Format_RGB16)
for x in xrange(width):
    for y in xrange(height):
        img.setPixel(x, y, QtGui.QColor(data[x,y],data[x,y],data[x,y]))

pix = QtGui.QPixmap.fromImage(img)

QtGui.QLabel label;
label.setPixmap(pix);
label.setMask(pix.mask());
label.show();
</code></pre>

python pyqt dicom itk