MCPcopy Create free account
hub / github.com/Kitware/VTK / ComputeVOI

Function ComputeVOI

Filters/ParallelDIY2/vtkExtractSubsetWithSeed.cxx:122–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120using SeedT = std::tuple<vtkVector3d, vtkVector3d, vtkVector3d>;
121
122vtkVector<int, 6> ComputeVOI(
123 vtkStructuredGrid* input, const int ijk[3], const int propagation_mask[3])
124{
125 vtkVector<int, 6> voi;
126 int data_ext[6];
127 input->GetExtent(data_ext);
128 for (int cc = 0; cc < 3; ++cc)
129 {
130 if (propagation_mask[cc] == 0)
131 {
132 voi[2 * cc] = ijk[cc];
133 voi[2 * cc + 1] = ijk[cc] + 1;
134 }
135 else
136 {
137 voi[2 * cc] = data_ext[2 * cc];
138 voi[2 * cc + 1] = data_ext[2 * cc + 1];
139 }
140 }
141
142 return voi;
143}
144
145/**
146 * Returns 3 unit vectors that identify the i,j,k directions for the cell.

Callers 1

ExtractSliceFromSeedFunction · 0.85

Calls 1

GetExtentMethod · 0.45

Tested by

no test coverage detected