Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkCreateDistanceImageFromSurfaceFilter.cpp
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 
18 #include "mitkImageCast.h"
19 
20 #include "vtkCellArray.h"
21 #include "vtkCellData.h"
22 #include "vtkDoubleArray.h"
23 #include "vtkPolyData.h"
24 #include "vtkSmartPointer.h"
25 
26 #include "itkImageRegionIteratorWithIndex.h"
27 #include "itkNeighborhoodIterator.h"
28 
29 #include <queue>
30 
31 void mitk::CreateDistanceImageFromSurfaceFilter::CreateEmptyDistanceImage()
32 {
33  // Determine the bounds of the input points in index- and world-coordinates
34  DistanceImageType::PointType minPointInWorldCoordinates, maxPointInWorldCoordinates;
35  DistanceImageType::IndexType minPointInIndexCoordinates, maxPointInIndexCoordinates;
36 
37  DetermineBounds(
38  minPointInWorldCoordinates, maxPointInWorldCoordinates, minPointInIndexCoordinates, maxPointInIndexCoordinates);
39 
40  // Calculate the extent of the region that contains all given points in MM.
41  // To do this, we take the difference between the maximal and minimal
42  // index-coordinates (must not be less than 1) and multiply it with the
43  // spacing of the reference-image.
44  Vector3D extentMM;
45  for (unsigned int dim = 0; dim < 3; ++dim)
46  {
47  extentMM[dim] = (std::abs(maxPointInIndexCoordinates[dim] - minPointInIndexCoordinates[dim])) *
48  m_ReferenceImage->GetSpacing()[dim];
49  }
50 
51  /*
52  * Now create an empty distance image. The created image will always have the same number of pixels, independent from
53  * the original image (e.g. always consists of 500000 pixels) and will have an isotropic spacing.
54  * The spacing is calculated like the following:
55  * The image's volume = 500000 Pixels = extentX*spacing*extentY*spacing*extentZ*spacing
56  * So the spacing is: spacing = ( extentX*extentY*extentZ / 500000 )^(1/3)
57  */
58  double basis = (extentMM[0] * extentMM[1] * extentMM[2]) / m_DistanceImageVolume;
59  double exponent = 1.0 / 3.0;
60  m_DistanceImageSpacing = pow(basis, exponent);
61 
62  // calculate the number of pixels of the distance image for each direction
63  unsigned int numberOfXPixel = extentMM[0] / m_DistanceImageSpacing;
64  unsigned int numberOfYPixel = extentMM[1] / m_DistanceImageSpacing;
65  unsigned int numberOfZPixel = extentMM[2] / m_DistanceImageSpacing;
66 
67  // We increase the sizeOfRegion by 4 as we decrease the origin by 2 later.
68  // This expansion of the region is necessary to achieve a complete
69  // interpolation.
70  DistanceImageType::SizeType sizeOfRegion;
71  sizeOfRegion[0] = numberOfXPixel + 8;
72  sizeOfRegion[1] = numberOfYPixel + 8;
73  sizeOfRegion[2] = numberOfZPixel + 8;
74 
75  // The region starts at index 0,0,0
76  DistanceImageType::IndexType initialOriginAsIndex;
77  initialOriginAsIndex.Fill(0);
78 
79  DistanceImageType::PointType originAsWorld = minPointInWorldCoordinates;
80 
81  DistanceImageType::RegionType lpRegion;
82  lpRegion.SetSize(sizeOfRegion);
83  lpRegion.SetIndex(initialOriginAsIndex);
84 
85  // We initialize the itk::Image with
86  // * origin and direction to have it correctly placed and rotated in the world
87  // * the largest possible region to set the extent to be calculated
88  // * the isotropic spacing that we have calculated above
89  m_DistanceImageITK = DistanceImageType::New();
90  m_DistanceImageITK->SetOrigin(originAsWorld);
91  m_DistanceImageITK->SetDirection(m_ReferenceImage->GetDirection());
92  m_DistanceImageITK->SetRegions(lpRegion);
93  m_DistanceImageITK->SetSpacing(m_DistanceImageSpacing);
94  m_DistanceImageITK->Allocate();
95 
96  // First of all the image is initialized with the value 10*m_DistanceImageSpacing for each pixel
97  m_DistanceImageDefaultBufferValue = 10 * m_DistanceImageSpacing;
98  m_DistanceImageITK->FillBuffer(m_DistanceImageDefaultBufferValue);
99 
100  // Now we move the origin of the distanceImage 2 index-Coordinates
101  // in all directions
102  DistanceImageType::IndexType originAsIndex;
103  m_DistanceImageITK->TransformPhysicalPointToIndex(originAsWorld, originAsIndex);
104  originAsIndex[0] -= 2;
105  originAsIndex[1] -= 2;
106  originAsIndex[2] -= 2;
107  m_DistanceImageITK->TransformIndexToPhysicalPoint(originAsIndex, originAsWorld);
108  m_DistanceImageITK->SetOrigin(originAsWorld);
109 }
110 
112 {
113  m_DistanceImageVolume = 50000;
114  this->m_UseProgressBar = false;
115  this->m_ProgressStepSize = 5;
116 
118  this->SetNthOutput(0, output.GetPointer());
119 }
120 
122 {
123 }
124 
126 {
127  this->PreprocessContourPoints();
128  this->CreateEmptyDistanceImage();
129 
130  // First of all we have to build the equation-system from the existing contour-edge-points
131  this->CreateSolutionMatrixAndFunctionValues();
132 
133  if (this->m_UseProgressBar)
135 
136  m_Weights = m_SolutionMatrix.partialPivLu().solve(m_FunctionValues);
137 
138  if (this->m_UseProgressBar)
140 
141  // The last step is to create the distance map with the interpolated distance function
142  this->FillDistanceImage();
143 
144  if (this->m_UseProgressBar)
146 
147  m_Centers.clear();
148  m_Normals.clear();
149 }
150 
151 void mitk::CreateDistanceImageFromSurfaceFilter::PreprocessContourPoints()
152 {
153  unsigned int numberOfInputs = this->GetNumberOfIndexedInputs();
154 
155  if (numberOfInputs == 0)
156  {
157  MITK_ERROR << "mitk::CreateDistanceImageFromSurfaceFilter: No input available. Please set an input!" << std::endl;
158  itkExceptionMacro("mitk::CreateDistanceImageFromSurfaceFilter: No input available. Please set an input!");
159  return;
160  }
161 
162  // First of all we have to extract the nomals and the surface points.
163  // Duplicated points can be eliminated
164 
165  Surface *currentSurface;
166  vtkSmartPointer<vtkPolyData> polyData;
167  vtkSmartPointer<vtkDoubleArray> currentCellNormals;
168  vtkSmartPointer<vtkCellArray> existingPolys;
169  vtkSmartPointer<vtkPoints> existingPoints;
170 
171  double p[3];
172  PointType currentPoint;
173  PointType normal;
174 
175  for (unsigned int i = 0; i < numberOfInputs; i++)
176  {
177  currentSurface = const_cast<Surface *>(this->GetInput(i));
178  polyData = currentSurface->GetVtkPolyData();
179 
180  if (polyData->GetNumberOfPolys() == 0)
181  {
182  MITK_INFO << "mitk::CreateDistanceImageFromSurfaceFilter: No input-polygons available. Please be sure the input "
183  "surface consists of polygons!"
184  << std::endl;
185  }
186 
187  currentCellNormals = vtkDoubleArray::SafeDownCast(polyData->GetCellData()->GetNormals());
188 
189  existingPolys = polyData->GetPolys();
190 
191  existingPoints = polyData->GetPoints();
192 
193  existingPolys->InitTraversal();
194 
195  vtkIdType *cell(nullptr);
196  vtkIdType cellSize(0);
197 
198  for (existingPolys->InitTraversal(); existingPolys->GetNextCell(cellSize, cell);)
199  {
200  for (vtkIdType j = 0; j < cellSize; j++)
201  {
202  existingPoints->GetPoint(cell[j], p);
203 
204  currentPoint.copy_in(p);
205 
206  int count = std::count(m_Centers.begin(), m_Centers.end(), currentPoint);
207 
208  if (count == 0)
209  {
210  double currentNormal[3];
211  currentCellNormals->GetTuple(cell[j], currentNormal);
212 
213  normal.copy_in(currentNormal);
214 
215  m_Normals.push_back(normal);
216 
217  m_Centers.push_back(currentPoint);
218  }
219 
220  } // end for all points
221  } // end for all cells
222  } // end for all outputs
223 }
224 
225 void mitk::CreateDistanceImageFromSurfaceFilter::CreateSolutionMatrixAndFunctionValues()
226 {
227  // For we can now calculate the exact size of the centers we initialize the data structures
228  unsigned int numberOfCenters = m_Centers.size();
229  m_Centers.reserve(numberOfCenters * 3);
230 
231  m_FunctionValues.resize(numberOfCenters * 3);
232 
233  m_FunctionValues.fill(0);
234 
235  PointType currentPoint;
236  PointType normal;
237 
238  // Create inner points
239  for (unsigned int i = 0; i < numberOfCenters; i++)
240  {
241  currentPoint = m_Centers.at(i);
242  normal = m_Normals.at(i);
243 
244  currentPoint[0] = currentPoint[0] - normal[0] * m_DistanceImageSpacing;
245  currentPoint[1] = currentPoint[1] - normal[1] * m_DistanceImageSpacing;
246  currentPoint[2] = currentPoint[2] - normal[2] * m_DistanceImageSpacing;
247 
248  m_Centers.push_back(currentPoint);
249 
250  m_FunctionValues[numberOfCenters + i] = -m_DistanceImageSpacing;
251  }
252 
253  // Create outer points
254  for (unsigned int i = 0; i < numberOfCenters; i++)
255  {
256  currentPoint = m_Centers.at(i);
257  normal = m_Normals.at(i);
258 
259  currentPoint[0] = currentPoint[0] + normal[0] * m_DistanceImageSpacing;
260  currentPoint[1] = currentPoint[1] + normal[1] * m_DistanceImageSpacing;
261  currentPoint[2] = currentPoint[2] + normal[2] * m_DistanceImageSpacing;
262 
263  m_Centers.push_back(currentPoint);
264 
265  m_FunctionValues[numberOfCenters * 2 + i] = m_DistanceImageSpacing;
266  }
267 
268  // Now we have created all centers and all function values. Next step is to create the solution matrix
269  numberOfCenters = m_Centers.size();
270 
271  m_SolutionMatrix.resize(numberOfCenters, numberOfCenters);
272 
273  m_Weights.resize(numberOfCenters);
274 
275  PointType p1;
276  PointType p2;
277  double norm;
278 
279  for (unsigned int i = 0; i < numberOfCenters; i++)
280  {
281  for (unsigned int j = 0; j < numberOfCenters; j++)
282  {
283  // Calculate the RBF value. Currently using Phi(r) = r with r is the euclidian distance between two points
284  p1 = m_Centers.at(i);
285  p2 = m_Centers.at(j);
286  p1 = p1 - p2;
287  norm = p1.two_norm();
288  m_SolutionMatrix(i, j) = norm;
289  }
290  }
291 }
292 
293 void mitk::CreateDistanceImageFromSurfaceFilter::FillDistanceImage()
294 {
295  /*
296  * Now we must calculate the distance for each pixel. But instead of calculating the distance value
297  * for all of the image's pixels we proceed similar to the region growing algorithm:
298  *
299  * 1. Take the first pixel from the narrowband_point_list and calculate the distance for each neighbor (6er)
300  * 2. If the current index's distance value is below a certain threshold push it into the list
301  * 3. Next iteration take the next index from the list and originAsIndex with 1. again
302  *
303  * This is done until the narrowband_point_list is empty.
304  */
305 
306  typedef itk::ImageRegionIteratorWithIndex<DistanceImageType> ImageIterator;
307  typedef itk::NeighborhoodIterator<DistanceImageType> NeighborhoodImageIterator;
308 
309  std::queue<DistanceImageType::IndexType> narrowbandPoints;
310  PointType currentPoint = m_Centers.at(0);
311  double distance = this->CalculateDistanceValue(currentPoint);
312 
313  // create itk::Point from vnl_vector
314  DistanceImageType::PointType currentPointAsPoint;
315  currentPointAsPoint[0] = currentPoint[0];
316  currentPointAsPoint[1] = currentPoint[1];
317  currentPointAsPoint[2] = currentPoint[2];
318 
319  // Transform the input point in world-coordinates to index-coordinates
320  DistanceImageType::IndexType currentIndex;
321  m_DistanceImageITK->TransformPhysicalPointToIndex(currentPointAsPoint, currentIndex);
322 
323  assert(
324  m_DistanceImageITK->GetLargestPossibleRegion().IsInside(currentIndex)); // we are quite certain this should hold
325 
326  narrowbandPoints.push(currentIndex);
327  m_DistanceImageITK->SetPixel(currentIndex, distance);
328 
329  NeighborhoodImageIterator::RadiusType radius;
330  radius.Fill(1);
331  NeighborhoodImageIterator nIt(radius, m_DistanceImageITK, m_DistanceImageITK->GetLargestPossibleRegion());
332  unsigned int relativeNbIdx[] = {4, 10, 12, 14, 16, 22};
333 
334  bool isInBounds = false;
335  while (!narrowbandPoints.empty())
336  {
337  nIt.SetLocation(narrowbandPoints.front());
338  narrowbandPoints.pop();
339 
340  unsigned int *relativeNb = &relativeNbIdx[0];
341  for (int i = 0; i < 6; i++)
342  {
343  nIt.GetPixel(*relativeNb, isInBounds);
344  if (isInBounds && nIt.GetPixel(*relativeNb) == m_DistanceImageDefaultBufferValue)
345  {
346  currentIndex = nIt.GetIndex(*relativeNb);
347 
348  // Transform the currently checked point from index-coordinates to
349  // world-coordinates
350  m_DistanceImageITK->TransformIndexToPhysicalPoint(currentIndex, currentPointAsPoint);
351 
352  // create a vnl_vector
353  currentPoint[0] = currentPointAsPoint[0];
354  currentPoint[1] = currentPointAsPoint[1];
355  currentPoint[2] = currentPointAsPoint[2];
356 
357  // and check the distance
358  distance = this->CalculateDistanceValue(currentPoint);
359  if (std::fabs(distance) <= m_DistanceImageSpacing * 2)
360  {
361  nIt.SetPixel(*relativeNb, distance);
362  narrowbandPoints.push(currentIndex);
363  }
364  }
365  relativeNb++;
366  }
367  }
368 
369  ImageIterator imgRegionIterator(m_DistanceImageITK, m_DistanceImageITK->GetLargestPossibleRegion());
370  imgRegionIterator.GoToBegin();
371 
372  double prevPixelVal = 1;
373 
374  DistanceImageType::IndexType _size;
375  _size.Fill(-1);
376  _size += m_DistanceImageITK->GetLargestPossibleRegion().GetSize();
377 
378  // Set every pixel inside the surface to -m_DistanceImageDefaultBufferValue except the edge point (so that the
379  // received surface is closed)
380  while (!imgRegionIterator.IsAtEnd())
381  {
382  if (imgRegionIterator.Get() == m_DistanceImageDefaultBufferValue && prevPixelVal < 0)
383  {
384  while (imgRegionIterator.Get() == m_DistanceImageDefaultBufferValue)
385  {
386  if (imgRegionIterator.GetIndex()[0] == _size[0] || imgRegionIterator.GetIndex()[1] == _size[1] ||
387  imgRegionIterator.GetIndex()[2] == _size[2] || imgRegionIterator.GetIndex()[0] == 0U ||
388  imgRegionIterator.GetIndex()[1] == 0U || imgRegionIterator.GetIndex()[2] == 0U)
389  {
390  imgRegionIterator.Set(m_DistanceImageDefaultBufferValue);
391  prevPixelVal = m_DistanceImageDefaultBufferValue;
392  ++imgRegionIterator;
393  break;
394  }
395  else
396  {
397  imgRegionIterator.Set((-1) * m_DistanceImageDefaultBufferValue);
398  ++imgRegionIterator;
399  prevPixelVal = (-1) * m_DistanceImageDefaultBufferValue;
400  }
401  }
402  }
403  else if (imgRegionIterator.GetIndex()[0] == _size[0] || imgRegionIterator.GetIndex()[1] == _size[1] ||
404  imgRegionIterator.GetIndex()[2] == _size[2] || imgRegionIterator.GetIndex()[0] == 0U ||
405  imgRegionIterator.GetIndex()[1] == 0U || imgRegionIterator.GetIndex()[2] == 0U)
406 
407  {
408  imgRegionIterator.Set(m_DistanceImageDefaultBufferValue);
409  prevPixelVal = m_DistanceImageDefaultBufferValue;
410  ++imgRegionIterator;
411  }
412  else
413  {
414  prevPixelVal = imgRegionIterator.Get();
415  ++imgRegionIterator;
416  }
417  }
418 
419  Image::Pointer resultImage = this->GetOutput();
420 
421  // Cast the created distance-Image from itk::Image to the mitk::Image
422  // that is our output.
423  CastToMitkImage(m_DistanceImageITK, resultImage);
424 }
425 
426 double mitk::CreateDistanceImageFromSurfaceFilter::CalculateDistanceValue(PointType p)
427 {
428  double distanceValue(0);
429  PointType p1;
430  PointType p2;
431  double norm;
432 
433  CenterList::iterator centerIter;
434 
435  unsigned int count(0);
436  for (centerIter = m_Centers.begin(); centerIter != m_Centers.end(); centerIter++)
437  {
438  p1 = *centerIter;
439  p2 = p - p1;
440  norm = p2.two_norm();
441  distanceValue = distanceValue + (norm * m_Weights[count]);
442  ++count;
443  }
444  return distanceValue;
445 }
446 
448 {
449 }
450 
452 {
453  std::stringstream out;
454  out << "Nummber of rows: " << m_SolutionMatrix.rows() << " ****** Number of columns: " << m_SolutionMatrix.cols()
455  << endl;
456  out << "[ ";
457  for (int i = 0; i < m_SolutionMatrix.rows(); i++)
458  {
459  for (int j = 0; j < m_SolutionMatrix.cols(); j++)
460  {
461  out << m_SolutionMatrix(i, j) << " ";
462  }
463  out << ";" << endl;
464  }
465  out << " ]\n\n\n";
466 
467  for (unsigned int i = 0; i < m_Centers.size(); i++)
468  {
469  out << m_Centers.at(i) << ";" << endl;
470  }
471  std::cout << "Equation system: \n\n\n" << out.str();
472 }
473 
475 {
476  this->SetInput(0, const_cast<mitk::Surface *>(surface));
477 }
478 
480 {
481  if (this->GetInput(idx) != surface)
482  {
483  this->SetNthInput(idx, const_cast<mitk::Surface *>(surface));
484  this->Modified();
485  }
486 }
487 
489 {
490  if (this->GetNumberOfIndexedInputs() < 1)
491  return nullptr;
492 
493  return static_cast<const mitk::Surface *>(this->ProcessObject::GetInput(0));
494 }
495 
497 {
498  if (this->GetNumberOfIndexedInputs() < 1)
499  return nullptr;
500 
501  return static_cast<const mitk::Surface *>(this->ProcessObject::GetInput(idx));
502 }
503 
505 {
506  DataObjectPointerArraySizeType nb = this->GetNumberOfIndexedInputs();
507 
508  for (DataObjectPointerArraySizeType i = 0; i < nb; i++)
509  {
510  if (this->GetInput(i) == input)
511  {
512  this->RemoveInput(i);
513  return;
514  }
515  }
516 }
517 
519 {
520  for (unsigned int i = 0; i < this->GetNumberOfIndexedInputs(); i++)
521  {
522  this->PopBackInput();
523  }
524  this->SetNumberOfIndexedInputs(0);
525  this->SetNumberOfIndexedOutputs(1);
526 
528  this->SetNthOutput(0, output.GetPointer());
529 }
530 
532 {
533  this->m_UseProgressBar = status;
534 }
535 
537 {
538  this->m_ProgressStepSize = stepSize;
539 }
540 
542 {
543  m_ReferenceImage = referenceImage;
544 }
545 
546 void mitk::CreateDistanceImageFromSurfaceFilter::DetermineBounds(
547  DistanceImageType::PointType &minPointInWorldCoordinates,
548  DistanceImageType::PointType &maxPointInWorldCoordinates,
549  DistanceImageType::IndexType &minPointInIndexCoordinates,
550  DistanceImageType::IndexType &maxPointInIndexCoordinates)
551 {
552  PointType firstCenter = m_Centers.at(0);
554  tmpPoint[0] = firstCenter[0];
555  tmpPoint[1] = firstCenter[1];
556  tmpPoint[2] = firstCenter[2];
557 
558  // transform the first point from world-coordinates to index-coordinates
559  itk::ContinuousIndex<double, 3> tmpIndex;
560  m_ReferenceImage->TransformPhysicalPointToContinuousIndex(tmpPoint, tmpIndex);
561 
562  // initialize the variables with this first point
563  DistanceImageType::IndexValueType xmin = tmpIndex[0];
564  DistanceImageType::IndexValueType ymin = tmpIndex[1];
565  DistanceImageType::IndexValueType zmin = tmpIndex[2];
566  DistanceImageType::IndexValueType xmax = tmpIndex[0];
567  DistanceImageType::IndexValueType ymax = tmpIndex[1];
568  DistanceImageType::IndexValueType zmax = tmpIndex[2];
569 
570  // iterate over the rest of the points
571  auto centerIter = m_Centers.begin();
572  for (++centerIter; centerIter != m_Centers.end(); centerIter++)
573  {
574  tmpPoint[0] = (*centerIter)[0];
575  tmpPoint[1] = (*centerIter)[1];
576  tmpPoint[2] = (*centerIter)[2];
577 
578  // transform each point from world-coordinates to index-coordinates
579  m_ReferenceImage->TransformPhysicalPointToContinuousIndex(tmpPoint, tmpIndex);
580 
581  // and set the variables accordingly to find the minimum
582  // and maximum in all directions in index-coordinates
583  if (xmin > tmpIndex[0])
584  {
585  xmin = tmpIndex[0];
586  }
587  if (ymin > tmpIndex[1])
588  {
589  ymin = tmpIndex[1];
590  }
591  if (zmin > tmpIndex[2])
592  {
593  zmin = tmpIndex[2];
594  }
595  if (xmax < tmpIndex[0])
596  {
597  xmax = tmpIndex[0];
598  }
599  if (ymax < tmpIndex[1])
600  {
601  ymax = tmpIndex[1];
602  }
603  if (zmax < tmpIndex[2])
604  {
605  zmax = tmpIndex[2];
606  }
607  }
608 
609  // put the found coordinates into Index-Points
610  minPointInIndexCoordinates[0] = xmin;
611  minPointInIndexCoordinates[1] = ymin;
612  minPointInIndexCoordinates[2] = zmin;
613 
614  maxPointInIndexCoordinates[0] = xmax;
615  maxPointInIndexCoordinates[1] = ymax;
616  maxPointInIndexCoordinates[2] = zmax;
617 
618  // and transform them into world-coordinates
619  m_ReferenceImage->TransformIndexToPhysicalPoint(minPointInIndexCoordinates, minPointInWorldCoordinates);
620  m_ReferenceImage->TransformIndexToPhysicalPoint(maxPointInIndexCoordinates, maxPointInWorldCoordinates);
621 }
void Progress(unsigned int steps=1)
Sets the current amount of progress to current progress + steps.
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:32
mitk::Point3D PointType
itk::SmartPointer< Self > Pointer
#define MITK_INFO
Definition: mitkLogMacros.h:22
#define MITK_ERROR
Definition: mitkLogMacros.h:24
itk::SmartPointer< Self > Pointer
Definition: mitkImage.h:88
static ProgressBar * GetInstance()
static method to get the GUI dependent ProgressBar-instance so the methods for steps to do and progre...
void SetReferenceImage(itk::ImageBase< 3 >::Pointer referenceImage)
void SetProgressStepSize(unsigned int stepSize)
Set the stepsize which the progress bar should proceed.
Vector< ScalarType, 3 > Vector3D
Definition: mitkVector.h:134
virtual void GenerateData() override
A version of GenerateData() specific for image processing filters.
static Pointer New()
void CastToMitkImage(const itk::SmartPointer< ItkOutputImageType > &itkimage, itk::SmartPointer< mitk::Image > &mitkoutputimage)
Cast an itk::Image (with a specific type) to an mitk::Image.
Definition: mitkImageCast.h:78
void SetUseProgressBar(bool)
Set whether the mitkProgressBar should be used.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.