[vtkusers] how to use the function GetScalarComponentAsDouble(i, j, 0, 0)

orientation f fuzengliang435 at gmail.com
Sun Aug 26 08:22:52 EDT 2007


hello:
we can get the gray-value of point (i,j) with
GetScalarComponentAsDouble(i,j,0,0). For example,

vtkImageData *imgData=vtkImageData::New();
imgData->DeepCopy(reader-GetOutput());//reader is the pointer to a DICOM
image

imgData->GetScalarComponentAsDouble(i,j,0,0);//method 1
reader->GetOutput()->GetScalarComponentAsDouble(i,j,0,0);//method2

both of above methods can get gray-value of (i,j), and there are following
relationship:
imgData->GetScalarComponentAsDouble(i,j,0,0)=reader->GetOutput()->GetScalarComponentAsDouble(i,j,0,0);
but
imgData->GetScalarComponentAsDouble(i-1,j-1,0,0)!=reader->GetOutput()->GetScalarComponentAsDouble(i-1,j-1,0,0);
so what's the difference between two methods?
thank you very much!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070826/b7fc25af/attachment.htm>


More information about the vtkusers mailing list