2
데이터 세트의 범위는 어떻게 받습니까? 데이터의 경계 상자라고도합니다. 데이터는 StructuredPointsReader
으로 읽습니다.포인트 데이터의 경계 상자를 가져 오는 방법은 무엇입니까?
데이터 세트의 범위는 어떻게 받습니까? 데이터의 경계 상자라고도합니다. 데이터는 StructuredPointsReader
으로 읽습니다.포인트 데이터의 경계 상자를 가져 오는 방법은 무엇입니까?
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;