how to modify Medical4 example of vtk to accept DICOM format slices


I am trying to replace quarter.1…quater.xx with quarter1.dcm…quarterxx.dcm,

  1. what is the format of headsq/quarter.1…quarter.xx?
  2. how to convert DICOM slices to headsq slice formats?
  3. would be that fixed with modification of the Medical1…Medical4 vtk example?

any help appreciated


That is a more of VTK question, belonging to the VTK forum. But here is my stab at it:

  1. " DATADIR/headsq/quarter" is just an example of a path to a 3D image. The image(s) are described in vtkVolume16Reader’s documentation.
  2. You should combine it with VTK’s read DICOM example

HI dzenan,
I got it to work by using vtkDICOMImageReader to read the DICOM slice files in Medical3.cxx and then i need to generalize the extent of the image and other things to make the sagittal, cronal and axial blades to center at iso center of volume. I am not happy with coloring of this this, In medical3 there are bwlut, huelut, and salut if i am not mistaken, but bwlut for sagittal is disastrous for center slice at least and you dont see much it is almost completely white with some black segments with are related to perhaps some tissues in back of the subject. bone and skin i removed in the Image3.cxx and also tried to figure out how to make the black and white segmented sagittal look like.

The strangest thing is that i have check these slices in paraview and they look not sharp but sort of output of Gaussian lowpass filter !?

any suggestions? these dicom slices come from TCIA site/head&neck CT, sort of not happy with the contrast, brightness, colors, how to pick out a tumor of sort of very at early stages of tumor? not happy with image quality!

any help to fix color tables saturation, hue, brightness would be appreciated!



Pick a different image, or a different image collection. If you must work with those images, welcome to the world of image processing, where nothing is perfect, and some things are far from perfection :smiley:

This is a straight up question for VTK forum!

Hi dzenan,

Thanks any ways I found some problem in my dataset and that is they are 2d images of slices which are rectangular (270 x 320) in these cases quality is even worse. I now try to change the image to 64 x 64 and then see what happens