<div dir="ltr"><div>Hi Everyone.</div><div><br></div><div>I have a problem or question at using vtk.</div><div><br></div><div>My work is get a value of some point. </div><div>So i use GetPoint method in ImageData structure.</div>
<div>but this work has problem.</div><div><br></div><div>My code is here.</div><div><br></div><div>first time i try use <b>one ImageData</b>. (Source is same)</div><div><br></div><div>/*------------------------------------------------------------------------------------*/</div>
<div><br></div><div>vtkSmartPointer<vtkImageData> imageData = vtkSmartPointer<vtkImageData>::New();<span class="" style="white-space:pre"> </span></div><div><br></div><div>imageData->DeepCopy(reslice->Getoutput()) // copy to coronal data</div>
<div><br></div><div>imageData->GetPoint(point ID(ex 65248), pos) // double pos[3]={0.0,}</div><div><br></div><div><br></div><div>/*------------------------------------------------------------------------------------*/</div>
<div><br></div><div>This work is correct. Return value of point is to exactly</div><div>But if i use<b> two ImageData</b></div><div><br></div><div><br></div><div><br></div><div>/*------------------------------------------------------------------------------------*/</div>
<div><br></div><div>vtkSmartPointer<vtkImageData> imageData = vtkSmartPointer<vtkImageData>::New();<span class="" style="white-space:pre"> </span></div><div>vtkSmartPointer<vtkImageData> imageData2 = vtkSmartPointer<vtkImageData>::New();<span class="" style="white-space:pre"> </span></div>
<div><br></div><div>imageData->DeepCopy(reslice->Getoutput()) // copy to coronal data</div><div>imageData->GetPoint(point ID(ex 65248), pos) // double pos[3]={0.0,}</div><div><br></div><div>imageData2->DeepCopy(reslice->Getoutput()) // copy to sagittal data</div>
<div>imageData2->GetPoint(point ID(ex 65243), pos2) // double pos2[3]={0.0,}</div><div><br></div><div><br></div><div>/*------------------------------------------------------------------------------------*/</div><div><br>
</div><div>In this case,<b><u> imageData->GetPoint(Not ImageData2) method retrun wrong value(</u></b>Do not same value when use one imagedata structure)</div><div><br></div><div>I have no idea this problem.</div><div><br>
</div><div>Why that value is different? </div><div><br></div><div><br></div><div><br></div></div>