4
votes

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
Two common reasons for too dark images are: 1) (lack of) gamma correction, and 2) alpha blending. Looking at the images on the right I would bet on alpha blending: your alpha is set to the intensity, and to zero for the light blue background. Try disabling alpha blending, if you can.Danny Ruijters
i tried changing value of alpha blending setting to 0/1, cant see any effectAngel.Risteski
My spontaneous thought about the difference is unused values in the output image. Opening the top-right image in an image editor shows this is the case. An image on screen is in the range 0-255 for black-white. You are only using 0-180ish. What you need is to scale it to 0-255. It seems the reference on the left is also cutting some of the higher values, effectively scaling your image's lower 0-100, say, into 0-255.Sebastian Ärleryd

2 Answers

2
votes

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
votes

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.