[vtkusers] Re: voxel values in vtkImageData
heochy at hotmail.com
heochy at hotmail.com
Thu May 6 21:04:59 EDT 2004
hi.. David Gobbi..
The right answer does not know...
code...............
vtkImageData *m_pImageData = m_pVolumeRayCastMapper->GetInput();
vtkUnsignedShortArray *array = vtkUnsignedShortArray::New();
//vtkImagedata sampling
array = (vtkUnsignedShortArray*)m_pImageData->GetPointData()->GetScalars();
//change of array data, and setting m_pImageData
float tuple;
int kOffset=0, jOffset=0, offset=0;
for(int a = 0; a < ; a++);
{
kOffset = bb[a].z*128*128;
jOffset = bb[a].y*128;
offset = bb[a].x +jOffset + kOffset;
array->SetTuple1(offset,0);
}
More information about the vtkusers
mailing list