[vtkusers] Please help about multithread problem on vtkPolyData->CopySctructure method
BAN, Hiroshi
ban.hiroshi at gmail.com
Fri Sep 12 02:56:21 EDT 2008
Dear VTK developers/users:
Hi, I am now analysing medical image (MRI) data using VTK on 64-bit Sun
Spark Solaris 10.
The version of VTK is 3.2 and compiled with multi-thread option for some
lab's specific reasons.
I am now facing the problem for this multi-thread option.
By using wrapped Tcl/Tk, I have created unstructured grid data (saved as
ascii *.vtk file format) from some brain tissue, and now trying to
overlap them on the 3D anatomical images. However, in the pipeline from
vtkUnstructuredGridReader to vtkPolyData, the mothod 'CopyStrucuture'
breaks or miss-copy the target unstructure grid data.
I recently read in Kitware web site and know that the 'CopyStructure' is
not thread safe. However, for some specific reason
of our labs, I can not use a single thread version of VTK.
So, if there are some alternative ways of 'CopyStructure' methods,
please please teach me.
I will paste a part of my source code below.
Thank you for your kindness in advance.
***** a part of my source code (Tcl/Tk) *****
vtkUnstructuredGridReader ugr # for reading the brain tissue
(unstructured grid data)
vtkPolyDataReader pdr # for converting ugr as poly data
# for standard volume
set pdfile [lindex $goipd_files $t] # unstructured grid data file name
pdr SetFileName $pdfile
pdr Update
vtkPolyData sSOIMesh$t
sSOIMesh$t CopyStructure [pdr GetOutput] *** !!! the problem is HERE
!!! ***
[sSOIMesh$t GetPointData] PassData [[pdr GetOutput] GetPointData]
***** a part of my source code (Tcl/Tk) *****
Sincerely,
Hiroshi Ban
More information about the vtkusers
mailing list