[vtkusers] Problem at using GetPoint or ImageData structure, Retruned data is wrong.
Jinsik Oh
js21cfriend at gmail.com
Mon Apr 7 04:31:07 EDT 2014
Hi Everyone.
I have a problem or question at using vtk.
My work is get a value of some point.
So i use GetPoint method in ImageData structure.
but this work has problem.
My code is here.
first time i try use *one ImageData*. (Source is same)
/*------------------------------------------------------------------------------------*/
vtkSmartPointer<vtkImageData> imageData =
vtkSmartPointer<vtkImageData>::New();
imageData->DeepCopy(reslice->Getoutput()) // copy to coronal data
imageData->GetPoint(point ID(ex 65248), pos) // double pos[3]={0.0,}
/*------------------------------------------------------------------------------------*/
This work is correct. Return value of point is to exactly
But if i use* two ImageData*
/*------------------------------------------------------------------------------------*/
vtkSmartPointer<vtkImageData> imageData =
vtkSmartPointer<vtkImageData>::New();
vtkSmartPointer<vtkImageData> imageData2 =
vtkSmartPointer<vtkImageData>::New();
imageData->DeepCopy(reslice->Getoutput()) // copy to coronal data
imageData->GetPoint(point ID(ex 65248), pos) // double pos[3]={0.0,}
imageData2->DeepCopy(reslice->Getoutput()) // copy to sagittal data
imageData2->GetPoint(point ID(ex 65243), pos2) // double pos2[3]={0.0,}
/*------------------------------------------------------------------------------------*/
In this case,* imageData->GetPoint(Not ImageData2) method retrun wrong
value(*Do not same value when use one imagedata structure)
I have no idea this problem.
Why that value is different?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140407/d3fc8ddf/attachment.html>
More information about the vtkusers
mailing list