Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
vtkPointSetSlicer.cxx
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 #include <algorithm>
17 #include <vector>
18 
19 #include "vtkPointSetSlicer.h"
20 
21 #include "vtkCellArray.h"
22 #include "vtkCellData.h"
23 #include "vtkCutter.h"
24 #include "vtkDataSet.h"
25 #include "vtkDoubleArray.h"
26 #include "vtkFloatArray.h"
27 #include "vtkGenericCell.h"
28 #include "vtkMergePoints.h"
29 #include "vtkObjectFactory.h"
30 #include "vtkPlane.h"
31 #include "vtkPointData.h"
32 #include "vtkPolyData.h"
33 
34 #include "vtkUnstructuredGrid.h"
35 
36 #include "vtkInformation.h"
37 #include "vtkInformationVector.h"
38 #include "vtkStreamingDemandDrivenPipeline.h"
39 
41 
42 // Construct with user-specified implicit function; initial value of 0.0; and
43 // generating cut scalars turned off.
45 {
46  this->SlicePlane = cf;
47  this->GenerateCutScalars = 0;
48  this->Locator = 0;
49 
50  this->Cutter = vtkCutter::New();
51  this->Cutter->GenerateValues(1, 0, 1);
52 }
53 
55 {
56  this->SetSlicePlane(0);
57  if (this->Locator)
58  {
59  this->Locator->UnRegister(this);
60  this->Locator = NULL;
61  }
62 
63  this->Cutter->Delete();
64 }
65 
66 void vtkPointSetSlicer::SetSlicePlane(vtkPlane *plane)
67 {
68  if (this->SlicePlane == plane)
69  {
70  return;
71  }
72  if (this->SlicePlane)
73  {
74  this->SlicePlane->UnRegister(this);
75  this->SlicePlane = 0;
76  }
77  if (plane)
78  {
79  plane->Register(this);
80  this->Cutter->SetCutFunction(plane);
81  }
82  this->SlicePlane = plane;
83  this->Modified();
84 }
85 
86 // Overload standard modified time function. If cut functions is modified,
87 // or contour values modified, then this object is modified as well.
89 {
90  unsigned long mTime = this->Superclass::GetMTime();
91  unsigned long time;
92 
93  if (this->SlicePlane != 0)
94  {
95  time = this->SlicePlane->GetMTime();
96  mTime = (time > mTime ? time : mTime);
97  }
98 
99  if (this->Locator != 0)
100  {
101  time = this->Locator->GetMTime();
102  mTime = (time > mTime ? time : mTime);
103  }
104 
105  return mTime;
106 }
107 
108 int vtkPointSetSlicer::RequestData(vtkInformation * /*request*/,
109  vtkInformationVector **inputVector,
110  vtkInformationVector *outputVector)
111 {
112  // get the info objects
113  vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
114  vtkInformation *outInfo = outputVector->GetInformationObject(0);
115 
116  // get the input and ouptut
117  vtkDataSet *input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT()));
118  vtkPolyData *output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
119 
120  vtkDebugMacro(<< "Executing cutter");
121 
122  if (!this->SlicePlane)
123  {
124  vtkErrorMacro("No slice plane specified");
125  return 0;
126  }
127 
128  if (input->GetNumberOfPoints() < 1)
129  {
130  return 1;
131  }
132 
133  if (input->GetDataObjectType() == VTK_STRUCTURED_POINTS || input->GetDataObjectType() == VTK_IMAGE_DATA)
134  {
135  if (input->GetCell(0) && input->GetCell(0)->GetCellDimension() >= 3)
136  {
137  // this->StructuredPointsCutter(input, output, request, inputVector, outputVector);
138  return 1;
139  }
140  }
141  if (input->GetDataObjectType() == VTK_STRUCTURED_GRID)
142  {
143  if (input->GetCell(0))
144  {
145  int dim = input->GetCell(0)->GetCellDimension();
146  // only do 3D structured grids (to be extended in the future)
147  if (dim >= 3)
148  {
149  // this->StructuredGridCutter(input, output);
150  return 1;
151  }
152  }
153  }
154  if (input->GetDataObjectType() == VTK_RECTILINEAR_GRID)
155  {
156  // this->RectilinearGridCutter(input, output);
157  return 1;
158  }
159 
160  if (input->GetDataObjectType() == VTK_UNSTRUCTURED_GRID)
161  {
162  vtkDebugMacro(<< "Executing Unstructured Grid Cutter");
163  this->UnstructuredGridCutter(input, output);
164  }
165  else
166  {
167  vtkDebugMacro(<< "Executing DataSet Cutter");
168  // this->DataSetCutter(input, output);
169  }
170 
171  return 1;
172 }
173 int vtkPointSetSlicer::RequestUpdateExtent(vtkInformation *, vtkInformationVector **inputVector, vtkInformationVector *)
174 {
175  vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
176  inInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), 1);
177  return 1;
178 }
180 {
181  info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet");
182  return 1;
183 }
184 
185 void vtkPointSetSlicer::UnstructuredGridCutter(vtkDataSet *input, vtkPolyData *output)
186 {
187  vtkIdType cellId, i;
188  vtkDoubleArray *cellScalars;
189  vtkCellArray *newVerts, *newLines, *newPolys;
190  vtkPoints *newPoints;
191  vtkDoubleArray *cutScalars;
192  double s;
193  vtkIdType estimatedSize, numCells = input->GetNumberOfCells();
194  vtkIdType numPts = input->GetNumberOfPoints();
195  vtkIdType cellArrayIt = 0;
196  int numCellPts;
197  vtkPointData *inPD, *outPD;
198  vtkCellData *inCD = input->GetCellData(), *outCD = output->GetCellData();
199  vtkIdList *cellIds;
200  int abortExecute = 0;
201 
202  double range[2];
203 
204  // Create objects to hold output of contour operation
205  //
206  estimatedSize = (vtkIdType)pow((double)numCells, .75);
207  estimatedSize = estimatedSize / 1024 * 1024; // multiple of 1024
208  if (estimatedSize < 1024)
209  {
210  estimatedSize = 1024;
211  }
212 
213  newPoints = vtkPoints::New();
214  newPoints->Allocate(estimatedSize, estimatedSize / 2);
215  newVerts = vtkCellArray::New();
216  newVerts->Allocate(estimatedSize, estimatedSize / 2);
217  newLines = vtkCellArray::New();
218  newLines->Allocate(estimatedSize, estimatedSize / 2);
219  newPolys = vtkCellArray::New();
220  newPolys->Allocate(estimatedSize, estimatedSize / 2);
221  cutScalars = vtkDoubleArray::New();
222  cutScalars->SetNumberOfTuples(numPts);
223 
224  // Interpolate data along edge. If generating cut scalars, do necessary setup
225  if (this->GenerateCutScalars)
226  {
227  inPD = vtkPointData::New();
228  inPD->ShallowCopy(input->GetPointData()); // copies original attributes
229  inPD->SetScalars(cutScalars);
230  }
231  else
232  {
233  inPD = input->GetPointData();
234  }
235  outPD = output->GetPointData();
236  outPD->InterpolateAllocate(inPD, estimatedSize, estimatedSize / 2);
237  outCD->CopyAllocate(inCD, estimatedSize, estimatedSize / 2);
238 
239  // locator used to merge potentially duplicate points
240  if (this->Locator == NULL)
241  {
242  this->CreateDefaultLocator();
243  }
244  this->Locator->InitPointInsertion(newPoints, input->GetBounds());
245 
246  // Loop over all points evaluating scalar function at each point
247  //
248  for (i = 0; i < numPts; i++)
249  {
250  s = this->SlicePlane->FunctionValue(input->GetPoint(i));
251  cutScalars->SetComponent(i, 0, s);
252  }
253 
254  // Compute some information for progress methods
255  //
256  vtkIdType numCuts = numCells;
257  vtkIdType progressInterval = numCuts / 20 + 1;
258  int cut = 0;
259 
260  vtkUnstructuredGrid *grid = (vtkUnstructuredGrid *)input;
261  vtkIdType *cellArrayPtr = grid->GetCells()->GetPointer();
262  double *scalarArrayPtr = cutScalars->GetPointer(0);
263  double tempScalar;
264  cellScalars = cutScalars->NewInstance();
265  cellScalars->SetNumberOfComponents(cutScalars->GetNumberOfComponents());
266  cellScalars->Allocate(VTK_CELL_SIZE * cutScalars->GetNumberOfComponents());
267 
268  // Three passes over the cells to process lower dimensional cells first.
269  // For poly data output cells need to be added in the order:
270  // verts, lines and then polys, or cell data gets mixed up.
271  // A better solution is to have an unstructured grid output.
272  // I create a table that maps cell type to cell dimensionality,
273  // because I need a fast way to get cell dimensionality.
274  // This assumes GetCell is slow and GetCellType is fast.
275  // I do not like hard coding a list of cell types here,
276  // but I do not want to add GetCellDimension(vtkIdType cellId)
277  // to the vtkDataSet API. Since I anticipate that the output
278  // will change to vtkUnstructuredGrid. This temporary solution
279  // is acceptable.
280  //
281  int cellType;
282  unsigned char cellTypeDimensions[VTK_NUMBER_OF_CELL_TYPES];
283  vtkCutter::GetCellTypeDimensions(cellTypeDimensions);
284  int dimensionality;
285  // We skip 0d cells (points), because they cannot be cut (generate no data).
286  for (dimensionality = 1; dimensionality <= 3; ++dimensionality)
287  {
288  // Loop over all cells; get scalar values for all cell points
289  // and process each cell.
290  //
291  cellArrayIt = 0;
292  for (cellId = 0; cellId < numCells && !abortExecute; cellId++)
293  {
294  numCellPts = cellArrayPtr[cellArrayIt];
295  // I assume that "GetCellType" is fast.
296  cellType = input->GetCellType(cellId);
297  if (cellType >= VTK_NUMBER_OF_CELL_TYPES)
298  { // Protect against new cell types added.
299  vtkErrorMacro("Unknown cell type " << cellType);
300  cellArrayIt += 1 + numCellPts;
301  continue;
302  }
303  if (cellTypeDimensions[cellType] != dimensionality)
304  {
305  cellArrayIt += 1 + numCellPts;
306  continue;
307  }
308  cellArrayIt++;
309 
310  // find min and max values in scalar data
311  range[0] = scalarArrayPtr[cellArrayPtr[cellArrayIt]];
312  range[1] = scalarArrayPtr[cellArrayPtr[cellArrayIt]];
313  cellArrayIt++;
314 
315  for (i = 1; i < numCellPts; i++)
316  {
317  tempScalar = scalarArrayPtr[cellArrayPtr[cellArrayIt]];
318  cellArrayIt++;
319  if (tempScalar <= range[0])
320  {
321  range[0] = tempScalar;
322  } // if tempScalar <= min range value
323  if (tempScalar >= range[1])
324  {
325  range[1] = tempScalar;
326  } // if tempScalar >= max range value
327  } // for all points in this cell
328 
329  int needCell = 0;
330  if (0.0 >= range[0] && 0.0 <= range[1])
331  {
332  needCell = 1;
333  }
334 
335  if (needCell)
336  {
337  vtkCell *cell = input->GetCell(cellId);
338  cellIds = cell->GetPointIds();
339  cutScalars->GetTuples(cellIds, cellScalars);
340  // Loop over all contour values.
341  if (dimensionality == 3 && !(++cut % progressInterval))
342  {
343  vtkDebugMacro(<< "Cutting #" << cut);
344  this->UpdateProgress(static_cast<double>(cut) / numCuts);
345  abortExecute = this->GetAbortExecute();
346  }
347 
349  cell, cellScalars, this->Locator, newVerts, newLines, newPolys, inPD, outPD, inCD, cellId, outCD);
350  } // if need cell
351  } // for all cells
352  } // for all dimensions (1,2,3).
353 
354  // Update ourselves. Because we don't know upfront how many verts, lines,
355  // polys we've created, take care to reclaim memory.
356  //
357  cellScalars->Delete();
358  cutScalars->Delete();
359 
360  if (this->GenerateCutScalars)
361  {
362  inPD->Delete();
363  }
364 
365  output->SetPoints(newPoints);
366  newPoints->Delete();
367 
368  if (newVerts->GetNumberOfCells())
369  {
370  output->SetVerts(newVerts);
371  }
372  newVerts->Delete();
373 
374  if (newLines->GetNumberOfCells())
375  {
376  output->SetLines(newLines);
377  }
378  newLines->Delete();
379 
380  if (newPolys->GetNumberOfCells())
381  {
382  output->SetPolys(newPolys);
383  }
384  newPolys->Delete();
385 
386  this->Locator->Initialize(); // release any extra memory
387  output->Squeeze();
388 }
389 
391  vtkDataArray *cellScalars,
392  vtkPointLocator *locator,
393  vtkCellArray *verts,
394  vtkCellArray *lines,
395  vtkCellArray *polys,
396  vtkPointData *inPd,
397  vtkPointData *outPd,
398  vtkCellData *inCd,
399  vtkIdType cellId,
400  vtkCellData *outCd)
401 {
402  if (cell->GetCellType() == VTK_HEXAHEDRON)
403  {
404  static int CASE_MASK[8] = {1, 2, 4, 8, 16, 32, 64, 128};
405  POLY_CASES *polyCase;
406  EDGE_LIST *edge;
407  int i, j, index, *vert;
408  volatile int pnum;
409  int v1, v2, newCellId;
410  double t, x1[3], x2[3], x[3], deltaScalar;
411  vtkIdType offset = verts->GetNumberOfCells() + lines->GetNumberOfCells();
412 
413  // Build the case table
414  for (i = 0, index = 0; i < 8; i++)
415  {
416  if (cellScalars->GetComponent(i, 0) >= 0)
417  {
418  index |= CASE_MASK[i];
419  }
420  }
421 
422  polyCase = polyCases + index;
423  edge = polyCase->edges;
424 
425  // get the point number of the polygon
426  pnum = 0;
427  for (i = 0; i < 8; i++)
428  if (edge[i] > -1)
429  pnum++;
430  else
431  break;
432 
433  vtkIdType *pts = new vtkIdType[pnum];
434  for (i = 0; i < pnum; i++) // insert polygon
435  {
436  vert = edges[edge[i]];
437 
438  // calculate a preferred interpolation direction
439  deltaScalar = (cellScalars->GetComponent(vert[1], 0) - cellScalars->GetComponent(vert[0], 0));
440  if (deltaScalar > 0)
441  {
442  v1 = vert[0];
443  v2 = vert[1];
444  }
445  else
446  {
447  v1 = vert[1];
448  v2 = vert[0];
449  deltaScalar = -deltaScalar;
450  }
451 
452  // linear interpolation
453  t = (deltaScalar == 0.0 ? 0.0 : (-cellScalars->GetComponent(v1, 0)) / deltaScalar);
454 
455  cell->GetPoints()->GetPoint(v1, x1);
456  cell->GetPoints()->GetPoint(v2, x2);
457 
458  for (j = 0; j < 3; j++)
459  {
460  x[j] = x1[j] + t * (x2[j] - x1[j]);
461  }
462  if (locator->InsertUniquePoint(x, pts[i]))
463  {
464  if (outPd)
465  {
466  vtkIdType p1 = cell->GetPointIds()->GetId(v1);
467  vtkIdType p2 = cell->GetPointIds()->GetId(v2);
468  outPd->InterpolateEdge(inPd, pts[i], p1, p2, t);
469  }
470  }
471  }
472 
473  // check for degenerate polygon
474  std::vector<vtkIdType> pset;
475  for (i = 0; i < pnum; i++)
476  {
477  if (std::find(pset.begin(), pset.end(), pts[i]) == pset.end())
478  pset.push_back(pts[i]);
479  }
480 
481  if (pset.size() > 2)
482  {
483  i = 0;
484  for (std::vector<vtkIdType>::iterator iter = pset.begin(); iter != pset.end(); iter++)
485  {
486  pts[i] = *iter;
487  i++;
488  }
489  newCellId = offset + polys->InsertNextCell(pset.size(), pts);
490  outCd->CopyData(inCd, cellId, newCellId);
491  }
492  delete[] pts;
493  }
494  else
495  {
496  cell->Contour(0, cellScalars, locator, verts, lines, polys, inPd, outPd, inCd, cellId, outCd);
497  }
498 }
499 
500 // Specify a spatial locator for merging points. By default,
501 // an instance of vtkMergePoints is used.
502 void vtkPointSetSlicer::SetLocator(vtkPointLocator *locator)
503 {
504  if (this->Locator == locator)
505  {
506  return;
507  }
508  if (this->Locator)
509  {
510  this->Locator->UnRegister(this);
511  this->Locator = 0;
512  }
513  if (locator)
514  {
515  locator->Register(this);
516  }
517  this->Locator = locator;
518  this->Modified();
519 }
520 
522 {
523  if (this->Locator == 0)
524  {
525  this->Locator = vtkMergePoints::New();
526  this->Locator->Register(this);
527  this->Locator->Delete();
528  }
529 }
530 
531 void vtkPointSetSlicer::PrintSelf(std::ostream &os, vtkIndent indent)
532 {
533  this->Superclass::PrintSelf(os, indent);
534 
535  os << indent << "Slice Plane: " << this->SlicePlane << "\n";
536 
537  if (this->Locator)
538  {
539  os << indent << "Locator: " << this->Locator << "\n";
540  }
541  else
542  {
543  os << indent << "Locator: (none)\n";
544  }
545 
546  os << indent << "Generate Cut Scalars: " << (this->GenerateCutScalars ? "On\n" : "Off\n");
547 }
548 
549 int vtkPointSetSlicer::edges[12][2] = {
550  {0, 1}, {1, 2}, {3, 2}, {0, 3}, {4, 5}, {5, 6}, {7, 6}, {4, 7}, {0, 4}, {1, 5}, {2, 6}, {3, 7}};
551 
552 vtkPointSetSlicer::POLY_CASES vtkPointSetSlicer::polyCases[256] = {
553  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{0, 3, 8, -1, -1, -1, -1, -1}}, {{1, 0, 9, -1, -1, -1, -1, -1}},
554  {{1, 3, 8, 9, -1, -1, -1, -1}}, {{2, 1, 10, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
555  {{2, 0, 9, 10, -1, -1, -1, -1}}, {{2, 10, 9, 8, 3, -1, -1, -1}}, {{3, 2, 11, -1, -1, -1, -1, -1}},
556  {{0, 2, 11, 8, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{1, 9, 8, 11, 2, -1, -1, -1}},
557  {{3, 1, 10, 11, -1, -1, -1, -1}}, {{0, 8, 11, 10, 1, -1, -1, -1}}, {{3, 11, 10, 9, 0, -1, -1, -1}},
558  {{8, 9, 10, 11, -1, -1, -1, -1}}, {{4, 7, 8, -1, -1, -1, -1, -1}}, {{3, 7, 4, 0, -1, -1, -1, -1}},
559  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{9, 1, 3, 7, 4, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
560  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
561  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{11, 2, 0, 4, 7, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
562  {{1, 2, 11, 7, 4, 9, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
563  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{4, 7, 11, 10, 9, -1, -1, -1}}, {{5, 4, 9, -1, -1, -1, -1, -1}},
564  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{0, 4, 5, 1, -1, -1, -1, -1}}, {{8, 3, 1, 5, 4, -1, -1, -1}},
565  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{10, 2, 0, 4, 5, -1, -1, -1}},
566  {{2, 3, 8, 4, 5, 10, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
567  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
568  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{5, 4, 8, 11, 10, -1, -1, -1}},
569  {{5, 7, 8, 9, -1, -1, -1, -1}}, {{9, 5, 7, 3, 0, -1, -1, -1}}, {{8, 7, 5, 1, 0, -1, -1, -1}},
570  {{1, 3, 7, 5, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
571  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{2, 10, 5, 7, 3, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
572  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{2, 11, 7, 5, 1, -1, -1, -1}},
573  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
574  {{5, 7, 11, 10, -1, -1, -1, -1}}, {{6, 5, 10, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
575  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{1, 5, 6, 2, -1, -1, -1, -1}},
576  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{9, 0, 2, 6, 5, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
577  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
578  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{11, 3, 1, 5, 6, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
579  {{3, 0, 9, 5, 6, 11, -1, -1}}, {{6, 5, 9, 8, 11, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
580  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
581  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
582  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
583  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
584  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
585  {{6, 4, 9, 10, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{10, 6, 4, 0, 1, -1, -1, -1}},
586  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{9, 4, 6, 2, 1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
587  {{2, 0, 4, 6, -1, -1, -1, -1}}, {{3, 8, 4, 6, 2, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
588  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
589  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{3, 11, 6, 4, 0, -1, -1, -1}},
590  {{6, 4, 8, 11, -1, -1, -1, -1}}, {{6, 10, 9, 8, 7, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
591  {{6, 7, 8, 0, 1, 10, -1, -1}}, {{6, 10, 1, 3, 7, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
592  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{7, 8, 0, 2, 6, -1, -1, -1}}, {{2, 6, 7, 3, -1, -1, -1, -1}},
593  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
594  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
595  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{6, 7, 11, -1, -1, -1, -1, -1}}, {{7, 6, 11, -1, -1, -1, -1, -1}},
596  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
597  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
598  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{2, 6, 7, 3, -1, -1, -1, -1}}, {{8, 0, 2, 6, 7, -1, -1, -1}},
599  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{10, 1, 3, 7, 6, -1, -1, -1}},
600  {{0, 1, 10, 6, 7, 8, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{7, 6, 10, 9, 8, -1, -1, -1}},
601  {{4, 6, 11, 8, -1, -1, -1, -1}}, {{11, 6, 4, 0, 3, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
602  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
603  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{8, 4, 6, 2, 3, -1, -1, -1}},
604  {{0, 2, 6, 4, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{1, 9, 4, 6, 2, -1, -1, -1}},
605  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{1, 10, 6, 4, 0, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
606  {{4, 6, 10, 9, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
607  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
608  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
609  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
610  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
611  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{5, 9, 8, 11, 6, -1, -1, -1}},
612  {{5, 6, 11, 3, 0, 9, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{6, 11, 3, 1, 5, -1, -1, -1}},
613  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
614  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{5, 9, 0, 2, 6, -1, -1, -1}},
615  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{1, 5, 6, 2, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
616  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{5, 6, 10, -1, -1, -1, -1, -1}},
617  {{7, 5, 10, 11, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
618  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{11, 7, 5, 1, 2, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
619  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{10, 5, 7, 3, 2, -1, -1, -1}},
620  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
621  {{3, 1, 5, 7, -1, -1, -1, -1}}, {{0, 8, 7, 5, 1, -1, -1, -1}}, {{0, 9, 5, 7, 3, -1, -1, -1}},
622  {{7, 5, 9, 8, -1, -1, -1, -1}}, {{4, 8, 11, 10, 5, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
623  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
624  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
625  {{4, 5, 10, 2, 3, 8, -1, -1}}, {{5, 10, 2, 0, 4, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
626  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{4, 8, 3, 1, 5, -1, -1, -1}}, {{0, 4, 5, 1, -1, -1, -1, -1}},
627  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{4, 5, 9, -1, -1, -1, -1, -1}}, {{7, 11, 10, 9, 4, -1, -1, -1}},
628  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
629  {{7, 4, 9, 1, 2, 11, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{7, 11, 2, 0, 4, -1, -1, -1}},
630  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
631  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{4, 9, 1, 3, 7, -1, -1, -1}},
632  {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{3, 7, 4, 0, -1, -1, -1, -1}}, {{7, 4, 8, -1, -1, -1, -1, -1}},
633  {{10, 11, 8, 9, -1, -1, -1, -1}}, {{0, 3, 11, 10, 9, -1, -1, -1}}, {{1, 0, 8, 11, 10, -1, -1, -1}},
634  {{1, 3, 11, 10, -1, -1, -1, -1}}, {{2, 1, 9, 8, 11, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}},
635  {{2, 0, 8, 11, -1, -1, -1, -1}}, {{2, 3, 11, -1, -1, -1, -1, -1}}, {{3, 2, 10, 9, 8, -1, -1, -1}},
636  {{0, 2, 10, 9, -1, -1, -1, -1}}, {{-1, -1, -1, -1, -1, -1, -1, -1}}, {{1, 2, 10, -1, -1, -1, -1, -1}},
637  {{3, 1, 9, 8, -1, -1, -1, -1}}, {{0, 1, 9, -1, -1, -1, -1, -1}}, {{3, 0, 8, -1, -1, -1, -1, -1}},
638  {{-1, -1, -1, -1, -1, -1, -1, -1}}};
void PrintSelf(std::ostream &os, vtkIndent indent) override
virtual void SetSlicePlane(vtkPlane *)
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void ContourUnstructuredGridCell(vtkCell *cell, vtkDataArray *cellScalars, vtkPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd)
vtkPointLocator * Locator
static void info(const char *fmt,...)
Definition: svm.cpp:100
static Vector3D offset
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
unsigned long GetMTime() override
vtkPointSetSlicer(vtkPlane *cf=0)
void UnstructuredGridCutter(vtkDataSet *input, vtkPolyData *output)
vtkStandardNewMacro(vtkPointSetSlicer)
void SetLocator(vtkPointLocator *locator)
virtual int FillInputPortInformation(int port, vtkInformation *info) override
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.