<p>hello:<br>we can get the gray-value of point (i,j) with GetScalarComponentAsDouble(i,j,0,0). For example,</p>
<p>vtkImageData *imgData=vtkImageData::New();<br>imgData-&gt;DeepCopy(reader-GetOutput());//reader is the pointer to a DICOM image</p>
<p>imgData-&gt;GetScalarComponentAsDouble(i,j,0,0);//method 1<br>reader-&gt;GetOutput()-&gt;GetScalarComponentAsDouble(i,j,0,0);//method2</p>
<p>both of above methods can get gray-value of (i,j), and there are following relationship:<br>imgData-&gt;GetScalarComponentAsDouble(i,j,0,0)=reader-&gt;GetOutput()-&gt;GetScalarComponentAsDouble(i,j,0,0);<br>but <br>imgData-&gt;GetScalarComponentAsDouble(i-1,j-1,0,0)!=reader-&gt;GetOutput()-&gt;GetScalarComponentAsDouble(i-1,j-1,0,0);
<br>so what&#39;s the difference between two methods?<br>thank you very much!</p>