I use simple ITK for read dicom file but I do not know how to show it into a QLabel.
reader = SimpleITK.ImageFileReader()
reader.SetFileName("M:\\CT-RT DICOM\ct\\CT111253009007.dcm")
image1 = reader.Execute()
How can I show image1 in QLabel?
Maybe something like this? It should generate a QImage which you can then pass into the QLabel.
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
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();