0
我有一个3D矢量字段,我存储在一个vtkImageData对象。所述vtkImageData对象包含两个数组:使用VTK阈值图像数据(vtkImageThreshold)
- 一个3成分vtkDoubleArray(矢量x,y和z分量)
- 含有一个单独的量
1个部件vtkDoubleArray我想提取两个阵列的相应元素,其中1分量阵列的值位于特定范围内。以下是我所尝试的:
vtkSmartPointer<vtkImageThreshold> threshold =
vtkSmartPointer<vtkImageThreshold>::New();
threshold->SetInputData(image);
threshold->SetInputArrayToProcess(1, image->GetInformation()); // 1 is the Energy array index
threshold->ThresholdBetween(1e-22, 2e-22);
threshold->Update();
vtkSmartPointer<vtkImageData> thresholdedImage = threshold->GetOutput();
我也尝试过使用vtkThresholdPoints,但无济于事。任何建议将不胜感激。