[vtkusers] How to get pixel values from vtkImageData in C#?
Андрей Глухов
realandron at gmail.com
Wed Jan 20 05:29:40 EST 2010
I have an image DICOM. I need to choose the coordinates of points with
different colors. How can I get this color in C #? I use GetScalarPointer,
but this method returns an IntPtr.
vtkDICOMImageReader DicomReader = new vtkDICOMImageReader();
DicomReader.SetDirectoryName();
DicomReader.Update();
vtkImageData ID = new vtkImageData();
ID.DeepCopy(DicomReader.GetOutput());
int bit = DicomReader.GetBitsAllocated();//get 16
int scalar = DicomReader.GetDataScalarType();//get 4
.............
ID.GetScalarPointer(i, j, k);
............
Is there another way to get the color value in a scalar or RGB?
--
С Уважением,
Андрей.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100120/4681fa9f/attachment.htm>
More information about the vtkusers
mailing list