Correct display of DICOM images ITK-VTK (images too dark)

2.9k views Asked by At

I read dicom images with ITK using itk::ImageSeriesReader and itk::GDCMImageIO after reading i flip the images with itk::FlipImageFilter (to get right orientation of the images) and convert the itkImageData to vtkImageData using itk::ImageToVTKImageFilter. I visualization images with VTK using vtkResliceImageViewer in QVTKWidget2. I set:

 (vtkResliceImageViewer)m_imageViewer[i]->SetColorWindow(windowWidthTAGvalue[0028|1051]);
 (vtkResliceImageViewer)m_imageViewer[i]->SetColorLevel(windowCenterTAGvalue[0028|1050]);

and i set following blac&white LookUpTable:

   vtkLookupTable* lutbw = vtkLookupTable::New();
    lutbw->SetTableRange(0,1000);
    lutbw->SetSaturationRange(0,0);
    lutbw->SetHueRange(0,0);
    lutbw->SetValueRange(0,1);
    lutbw->Build();

And images shown into my software compared with the same images shown into other software are much darker, i can not get the same effect as other DICOM viewers

My software images are right other software image is left also when i use some other LookUpTable in this example Flow i can not get the same effect (2nd row images) my image on right is much darker then other.

ImageCompare

What i am missing why my images are darker what can i do? i was research a lot into dicom and ikt/vtk can not find good solution any help is appreciate.

2

There are 2 answers

5
LEADTOOLS Support On

Please check the values for Rescale Slope (0028,1053) and Rescale Intercept(0028,1052) and apply the Modality LUT transformation before applying the Window level. Your dataset may have VOI LUT Function (0028,1056) attribute value of "SIGMOID" instead of "LINEAR".

2
LEADTOOLS Support On

I extracted the image data from one of your DICOM file (brain_009.dcm) and looked at the histogram of the image data. It looks like, the minimum value stored in the image is 0 and maximum value is 960 regardless of interpreting the data is signed or unsigned. Also, the Window Width (0028:1051) has an invalid value of “0” and you cannot use that for displaying the image.
So your default display could set the Window Width to 960 and Window Center to half the window width plus the minimum value.