[vtk-developers] Getting Pixel Value from dicom
tferreira018 at live.com.pt
Sun Dec 18 19:05:16 EST 2011
Well i changed the code a LOT, and now i can get the pixel's of my image
so i write it to a file to create a new image and the result it's right
although this new image have the format and the borders of the bones of my
dicom CT, and belive me its really there, the image itself isnt quite good,
as you can see, its seems that the pixels have an opacity and a trasparecy
that aren't equaly to all the pixels.
anyone know what i should do? or maybe what i shouldn't?
the code follows bellow:
vtkDICOMImageReader *reader = vtkDICOMImageReader::New();
//convert to unsigned char image
vtkImageCast* originalCastFilter = vtkImageCast::New();
// Getting access to data!!!
vtkUnsignedCharArray* scalars = vtkUnsignedCharArray::SafeDownCast
for(vtkIdType i = 0; i < scalars->GetNumberOfTuples(); i++)
myfile << (int) scalars->GetValue(i) << " ";
if someone can help me plese tell me what i should do, i start to have a
and i really need to make this thing to work
thanks in advance
View this message in context: http://vtk.1045678.n5.nabble.com/Getting-Pixel-Value-from-dicom-tp5074987p5084733.html
Sent from the VTK - Dev mailing list archive at Nabble.com.
More information about the vtk-developers