データセットの範囲を取得するにはどうすればよいですか? データの境界ボックスとも呼ばれます。でデータを読み込みますStructuredPointsReader
。
2728 次
1 に答える
8
vtkStructuredPoints (vtkStructuredPointsReader の GetOutput() の型) は vtkDataSet のサブクラスであるため、vtkDataSet の GetBounds(double[6]) 関数を使用できます。次に例を示します。
double bounds[6];
structuredPointsReader->Update();
structuredPointsReader->GetOutput()->GetBounds(bounds);
std::cout << "xmin: " << bounds[0] << " "
<< "xmax: " << bounds[1] << std::endl
<< "ymin: " << bounds[2] << " "
<< "ymax: " << bounds[3] << std::endl
<< "zmin: " << bounds[4] << " "
<< "zmax: " << bounds[5] << std::endl;
于 2013-10-22T18:18:15.923 に答える