ITK  5.1.0
Insight Toolkit
itkBoxUtilities.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkBoxUtilities_h
19 #define itkBoxUtilities_h
20 
21 #include "itkProgressReporter.h"
23 #include "itkImageRegionIterator.h"
26 #include "itkImageRegionIterator.h"
27 #include "itkOffset.h"
31 
32 /*
33  *
34  * This code was contributed in the Insight Journal paper:
35  * "Efficient implementation of kernel filtering"
36  * by Beare R., Lehmann G
37  * https://hdl.handle.net/1926/555
38  * http://www.insight-journal.org/browse/publication/160
39  *
40  */
41 
43 {
44 
45 template <typename TIterator>
46 inline TIterator *
47 setConnectivityEarlyBox(TIterator * it, bool fullyConnected = false)
48 {
49  // activate the "previous" neighbours
50  typename TIterator::OffsetType offset;
51  it->ClearActiveList();
52  if (!fullyConnected)
53  {
54  // only activate the neighbors that are face connected
55  // to the current pixel. do not include the center pixel
56  offset.Fill(0);
57  for (unsigned int d = 0; d < TIterator::Dimension; ++d)
58  {
59  offset[d] = -1;
60  it->ActivateOffset(offset);
61  offset[d] = 0;
62  }
63  }
64  else
65  {
66  // activate all neighbors that are face+edge+vertex
67  // connected to the current pixel. do not include the center pixel
68  unsigned int centerIndex = it->GetCenterNeighborhoodIndex();
69  for (unsigned int d = 0; d < centerIndex; d++)
70  {
71  offset = it->GetOffset(d);
72  // check for positives in any dimension
73  bool keep = true;
74  for (unsigned int i = 0; i < TIterator::Dimension; i++)
75  {
76  if (offset[i] > 0)
77  {
78  keep = false;
79  break;
80  }
81  }
82  if (keep)
83  {
84  it->ActivateOffset(offset);
85  }
86  }
87  offset.Fill(0);
88  it->DeactivateOffset(offset);
89  }
90  return it;
91 }
92 
93 } // namespace itk_impl_details
94 
95 namespace itk
96 {
97 
98 template <typename TInputImage, typename TOutputImage>
99 void
100 BoxAccumulateFunction(const TInputImage * inputImage,
101  const TOutputImage * outputImage,
102  typename TInputImage::RegionType inputRegion,
103  typename TOutputImage::RegionType outputRegion
104 #if defined(ITKV4_COMPATIBILITY)
105  ,
106  ProgressReporter & progress)
107 #else
108 )
109 #endif
110 {
111  // type alias
112  using InputImageType = TInputImage;
113  using OffsetType = typename TInputImage::OffsetType;
114  using OutputImageType = TOutputImage;
115  using OutputPixelType = typename TOutputImage::PixelType;
116 
117  using InputIterator = ImageRegionConstIterator<TInputImage>;
118 
119  using NOutputIterator = ShapedNeighborhoodIterator<TOutputImage>;
120  InputIterator inIt(inputImage, inputRegion);
121  typename TInputImage::SizeType kernelRadius;
122  kernelRadius.Fill(1);
123 
124  NOutputIterator noutIt(kernelRadius, outputImage, outputRegion);
125  // this iterator is fully connected
127 
130  noutIt.OverrideBoundaryCondition(&oBC);
131  // This uses several iterators. An alternative and probably better
132  // approach would be to copy the input to the output and convolve
133  // with the following weights (in 2D)
134  // -(dim - 1) 1
135  // 1 1
136  // The result of each convolution needs to get written back to the
137  // image being convolved so that the accumulation propagates
138  // This should be implementable with neighborhood operators.
139 
140  std::vector<int> weights;
141  typename NOutputIterator::ConstIterator sIt;
142  for (auto idxIt = noutIt.GetActiveIndexList().begin(); idxIt != noutIt.GetActiveIndexList().end(); idxIt++)
143  {
144  OffsetType offset = noutIt.GetOffset(*idxIt);
145  int w = -1;
146  for (unsigned int k = 0; k < InputImageType::ImageDimension; k++)
147  {
148  if (offset[k] != 0)
149  {
150  w *= offset[k];
151  }
152  }
153  // std::cout << offset << " " << w << std::endl;
154  weights.push_back(w);
155  }
156 
157  for (inIt.GoToBegin(), noutIt.GoToBegin(); !noutIt.IsAtEnd(); ++inIt, ++noutIt)
158  {
159  OutputPixelType sum = 0;
160  int k;
161  for (k = 0, sIt = noutIt.Begin(); !sIt.IsAtEnd(); ++sIt, ++k)
162  {
163  sum += sIt.Get() * weights[k];
164  }
165  noutIt.SetCenterPixel(sum + inIt.Get());
166 #if defined(ITKV4_COMPATIBILITY)
167  progress.CompletedPixel();
168 #endif
169  }
170 }
171 
172 // a function to generate corners of arbitrary dimension box
173 template <typename TImage>
174 std::vector<typename TImage::OffsetType>
175 CornerOffsets(const TImage * im)
176 {
177  using NIterator = ShapedNeighborhoodIterator<TImage>;
178  typename TImage::SizeType unitradius;
179  unitradius.Fill(1);
180  NIterator n1(unitradius, im, im->GetRequestedRegion());
181  unsigned int centerIndex = n1.GetCenterNeighborhoodIndex();
182  typename NIterator::OffsetType offset;
183  std::vector<typename TImage::OffsetType> result;
184  for (unsigned int d = 0; d < centerIndex * 2 + 1; d++)
185  {
186  offset = n1.GetOffset(d);
187  // check whether this is a corner - corners have no zeros
188  bool corner = true;
189  for (unsigned int k = 0; k < TImage::ImageDimension; k++)
190  {
191  if (offset[k] == 0)
192  {
193  corner = false;
194  break;
195  }
196  }
197  if (corner)
198  {
199  result.push_back(offset);
200  }
201  }
202  return (result);
203 }
204 
205 template <typename TInputImage, typename TOutputImage>
206 void
207 BoxMeanCalculatorFunction(const TInputImage * accImage,
208  TOutputImage * outputImage,
209  typename TInputImage::RegionType inputRegion,
210  typename TOutputImage::RegionType outputRegion,
211  typename TInputImage::SizeType radius
212 #if defined(ITKV4_COMPATIBILITY)
213  ,
214  ProgressReporter & progress)
215 #else
216 )
217 #endif
218 {
219  // type alias
220  using InputImageType = TInputImage;
221  using RegionType = typename TInputImage::RegionType;
222  using SizeType = typename TInputImage::SizeType;
223  using IndexType = typename TInputImage::IndexType;
224  using OffsetType = typename TInputImage::OffsetType;
225  using OutputImageType = TOutputImage;
226  using OutputPixelType = typename TOutputImage::PixelType;
227  // use the face generator for speed
229  using FaceListType = typename FaceCalculatorType::FaceListType;
230  using FaceListTypeIt = typename FaceCalculatorType::FaceListType::iterator;
231  FaceCalculatorType faceCalculator;
232 
233  FaceListType faceList;
234  FaceListTypeIt fit;
236 
237  // this process is actually slightly asymmetric because we need to
238  // subtract rectangles that are next to our kernel, not overlapping it
239  SizeType kernelSize;
240  SizeType internalRadius;
241  SizeType regionLimit;
242 
243  IndexType regionStart = inputRegion.GetIndex();
244  for (unsigned int i = 0; i < TInputImage::ImageDimension; i++)
245  {
246  kernelSize[i] = radius[i] * 2 + 1;
247  internalRadius[i] = radius[i] + 1;
248  regionLimit[i] = inputRegion.GetSize()[i] + regionStart[i] - 1;
249  }
250 
251  using AccPixType = typename NumericTraits<OutputPixelType>::RealType;
252  // get a set of offsets to corners for a unit hypercube in this image
253  std::vector<OffsetType> unitCorners = CornerOffsets<TInputImage>(accImage);
254  std::vector<OffsetType> realCorners;
255  std::vector<AccPixType> weights;
256  // now compute the weights
257  for (unsigned int k = 0; k < unitCorners.size(); k++)
258  {
259  int prod = 1;
260  OffsetType thisCorner;
261  for (unsigned int i = 0; i < TInputImage::ImageDimension; i++)
262  {
263  prod *= unitCorners[k][i];
264  if (unitCorners[k][i] > 0)
265  {
266  thisCorner[i] = radius[i];
267  }
268  else
269  {
270  thisCorner[i] = -(static_cast<OffsetValueType>(radius[i]) + 1);
271  }
272  }
273  weights.push_back((AccPixType)prod);
274  realCorners.push_back(thisCorner);
275  }
276 
277  faceList = faceCalculator(accImage, outputRegion, internalRadius);
278  // start with the body region
279  for (fit = faceList.begin(); fit != faceList.end(); ++fit)
280  {
281  if (fit == faceList.begin())
282  {
283  // this is the body region. This is meant to be an optimized
284  // version that doesn't use neighborhood regions
285  // compute the various offsets
286  AccPixType pixelscount = 1;
287  for (unsigned int i = 0; i < TInputImage::ImageDimension; i++)
288  {
289  pixelscount *= (AccPixType)(2 * radius[i] + 1);
290  }
291 
292  using OutputIteratorType = ImageRegionIterator<OutputImageType>;
293  using InputIteratorType = ImageRegionConstIterator<InputImageType>;
294 
295  using CornerItVecType = std::vector<InputIteratorType>;
296  CornerItVecType cornerItVec;
297  // set up the iterators for each corner
298  for (unsigned int k = 0; k < realCorners.size(); k++)
299  {
300  typename InputImageType::RegionType tReg = (*fit);
301  tReg.SetIndex(tReg.GetIndex() + realCorners[k]);
302  InputIteratorType tempIt(accImage, tReg);
303  tempIt.GoToBegin();
304  cornerItVec.push_back(tempIt);
305  }
306  // set up the output iterator
307  OutputIteratorType oIt(outputImage, *fit);
308  // now do the work
309  for (oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt)
310  {
311  AccPixType sum = 0;
312  // check each corner
313  for (unsigned int k = 0; k < cornerItVec.size(); k++)
314  {
315  sum += weights[k] * cornerItVec[k].Get();
316  // increment each corner iterator
317  ++(cornerItVec[k]);
318  }
319  oIt.Set(static_cast<OutputPixelType>(sum / pixelscount));
320 #if defined(ITKV4_COMPATIBILITY)
321  progress.CompletedPixel();
322 #endif
323  }
324  }
325  else
326  {
327  // now we need to deal with the border regions
328  using OutputIteratorType = ImageRegionIteratorWithIndex<OutputImageType>;
329  OutputIteratorType oIt(outputImage, *fit);
330  // now do the work
331  for (oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt)
332  {
333  // figure out the number of pixels in the box by creating an
334  // equivalent region and cropping - this could probably be
335  // included in the loop below.
336  RegionType currentKernelRegion;
337  currentKernelRegion.SetSize(kernelSize);
338  // compute the region's index
339  IndexType kernelRegionIdx = oIt.GetIndex();
340  IndexType centIndex = kernelRegionIdx;
341  for (unsigned int i = 0; i < TInputImage::ImageDimension; i++)
342  {
343  kernelRegionIdx[i] -= radius[i];
344  }
345  currentKernelRegion.SetIndex(kernelRegionIdx);
346  currentKernelRegion.Crop(inputRegion);
347  OffsetValueType edgepixelscount = currentKernelRegion.GetNumberOfPixels();
348  AccPixType sum = 0;
349  // rules are : for each corner,
350  // for each dimension
351  // if dimension offset is positive -> this is
352  // a leading edge. Crop if outside the input
353  // region
354  // if dimension offset is negative -> this is
355  // a trailing edge. Ignore if it is outside
356  // image region
357  for (unsigned int k = 0; k < realCorners.size(); k++)
358  {
359  IndexType thisCorner = centIndex + realCorners[k];
360  bool includeCorner = true;
361  for (unsigned int j = 0; j < TInputImage::ImageDimension; j++)
362  {
363  if (unitCorners[k][j] > 0)
364  {
365  // leading edge - crop it
366  if (thisCorner[j] > static_cast<OffsetValueType>(regionLimit[j]))
367  {
368  thisCorner[j] = static_cast<OffsetValueType>(regionLimit[j]);
369  }
370  }
371  else
372  {
373  // trailing edge - check bounds
374  if (thisCorner[j] < regionStart[j])
375  {
376  includeCorner = false;
377  break;
378  }
379  }
380  }
381  if (includeCorner)
382  {
383  sum += accImage->GetPixel(thisCorner) * weights[k];
384  }
385  }
386 
387  oIt.Set(static_cast<OutputPixelType>(sum / (AccPixType)edgepixelscount));
388 #if defined(ITKV4_COMPATIBILITY)
389  progress.CompletedPixel();
390 #endif
391  }
392  }
393  }
394 }
395 
396 template <typename TInputImage, typename TOutputImage>
397 void
398 BoxSigmaCalculatorFunction(const TInputImage * accImage,
399  TOutputImage * outputImage,
400  typename TInputImage::RegionType inputRegion,
401  typename TOutputImage::RegionType outputRegion,
402  typename TInputImage::SizeType radius
403 #if defined(ITKV4_COMPATIBILITY)
404  ,
405  ProgressReporter & progress)
406 #else
407 )
408 #endif
409 {
410  // type alias
411  using InputImageType = TInputImage;
412  using RegionType = typename TInputImage::RegionType;
413  using SizeType = typename TInputImage::SizeType;
414  using IndexType = typename TInputImage::IndexType;
415  using OffsetType = typename TInputImage::OffsetType;
416  using OutputImageType = TOutputImage;
417  using OutputPixelType = typename TOutputImage::PixelType;
418  using InputPixelType = typename TInputImage::PixelType;
419  // use the face generator for speed
421  using FaceListType = typename FaceCalculatorType::FaceListType;
422  using FaceListTypeIt = typename FaceCalculatorType::FaceListType::iterator;
423  FaceCalculatorType faceCalculator;
424 
425  FaceListType faceList;
426  FaceListTypeIt fit;
428 
429  // this process is actually slightly asymmetric because we need to
430  // subtract rectangles that are next to our kernel, not overlapping it
431  SizeType kernelSize;
432  SizeType internalRadius;
433  SizeType regionLimit;
434  IndexType regionStart = inputRegion.GetIndex();
435  for (unsigned int i = 0; i < TInputImage::ImageDimension; i++)
436  {
437  kernelSize[i] = radius[i] * 2 + 1;
438  internalRadius[i] = radius[i] + 1;
439  regionLimit[i] = inputRegion.GetSize()[i] + regionStart[i] - 1;
440  }
441 
442  using AccPixType = typename NumericTraits<OutputPixelType>::RealType;
443  // get a set of offsets to corners for a unit hypercube in this image
444  std::vector<OffsetType> unitCorners = CornerOffsets<TInputImage>(accImage);
445  std::vector<OffsetType> realCorners;
446  std::vector<AccPixType> weights;
447  // now compute the weights
448  for (unsigned int k = 0; k < unitCorners.size(); k++)
449  {
450  int prod = 1;
451  OffsetType thisCorner;
452  for (unsigned int i = 0; i < TInputImage::ImageDimension; i++)
453  {
454  prod *= unitCorners[k][i];
455  if (unitCorners[k][i] > 0)
456  {
457  thisCorner[i] = radius[i];
458  }
459  else
460  {
461  thisCorner[i] = -(static_cast<OffsetValueType>(radius[i]) + 1);
462  }
463  }
464  weights.push_back((AccPixType)prod);
465  realCorners.push_back(thisCorner);
466  }
467 
468  faceList = faceCalculator(accImage, outputRegion, internalRadius);
469  // start with the body region
470  for (fit = faceList.begin(); fit != faceList.end(); ++fit)
471  {
472  if (fit == faceList.begin())
473  {
474  // this is the body region. This is meant to be an optimized
475  // version that doesn't use neighborhood regions
476  // compute the various offsets
477  AccPixType pixelscount = 1;
478  for (unsigned int i = 0; i < TInputImage::ImageDimension; i++)
479  {
480  pixelscount *= (AccPixType)(2 * radius[i] + 1);
481  }
482 
483  using OutputIteratorType = ImageRegionIterator<OutputImageType>;
484  using InputIteratorType = ImageRegionConstIterator<InputImageType>;
485 
486  using CornerItVecType = std::vector<InputIteratorType>;
487  CornerItVecType cornerItVec;
488  // set up the iterators for each corner
489  for (unsigned int k = 0; k < realCorners.size(); k++)
490  {
491  typename InputImageType::RegionType tReg = (*fit);
492  tReg.SetIndex(tReg.GetIndex() + realCorners[k]);
493  InputIteratorType tempIt(accImage, tReg);
494  tempIt.GoToBegin();
495  cornerItVec.push_back(tempIt);
496  }
497  // set up the output iterator
498  OutputIteratorType oIt(outputImage, *fit);
499  // now do the work
500  for (oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt)
501  {
502  AccPixType sum = 0;
503  AccPixType squareSum = 0;
504  // check each corner
505  for (unsigned int k = 0; k < cornerItVec.size(); k++)
506  {
507  const InputPixelType & i = cornerItVec[k].Get();
508  sum += weights[k] * i[0];
509  squareSum += weights[k] * i[1];
510  // increment each corner iterator
511  ++(cornerItVec[k]);
512  }
513 
514  oIt.Set(static_cast<OutputPixelType>(std::sqrt((squareSum - sum * sum / pixelscount) / (pixelscount - 1))));
515 #if defined(ITKV4_COMPATIBILITY)
516  progress.CompletedPixel();
517 #endif
518  }
519  }
520  else
521  {
522  // now we need to deal with the border regions
523  using OutputIteratorType = ImageRegionIteratorWithIndex<OutputImageType>;
524  OutputIteratorType oIt(outputImage, *fit);
525  // now do the work
526  for (oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt)
527  {
528  // figure out the number of pixels in the box by creating an
529  // equivalent region and cropping - this could probably be
530  // included in the loop below.
531  RegionType currentKernelRegion;
532  currentKernelRegion.SetSize(kernelSize);
533  // compute the region's index
534  IndexType kernelRegionIdx = oIt.GetIndex();
535  IndexType centIndex = kernelRegionIdx;
536  for (unsigned int i = 0; i < TInputImage::ImageDimension; i++)
537  {
538  kernelRegionIdx[i] -= radius[i];
539  }
540  currentKernelRegion.SetIndex(kernelRegionIdx);
541  currentKernelRegion.Crop(inputRegion);
542  SizeValueType edgepixelscount = currentKernelRegion.GetNumberOfPixels();
543  AccPixType sum = 0;
544  AccPixType squareSum = 0;
545  // rules are : for each corner,
546  // for each dimension
547  // if dimension offset is positive -> this is
548  // a leading edge. Crop if outside the input
549  // region
550  // if dimension offset is negative -> this is
551  // a trailing edge. Ignore if it is outside
552  // image region
553  for (unsigned int k = 0; k < realCorners.size(); k++)
554  {
555  IndexType thisCorner = centIndex + realCorners[k];
556  bool includeCorner = true;
557  for (unsigned int j = 0; j < TInputImage::ImageDimension; j++)
558  {
559  if (unitCorners[k][j] > 0)
560  {
561  // leading edge - crop it
562  if (thisCorner[j] > static_cast<OffsetValueType>(regionLimit[j]))
563  {
564  thisCorner[j] = static_cast<OffsetValueType>(regionLimit[j]);
565  }
566  }
567  else
568  {
569  // trailing edge - check bounds
570  if (thisCorner[j] < regionStart[j])
571  {
572  includeCorner = false;
573  break;
574  }
575  }
576  }
577  if (includeCorner)
578  {
579  const InputPixelType & i = accImage->GetPixel(thisCorner);
580  sum += weights[k] * i[0];
581  squareSum += weights[k] * i[1];
582  }
583  }
584 
585  oIt.Set(
586  static_cast<OutputPixelType>(std::sqrt((squareSum - sum * sum / edgepixelscount) / (edgepixelscount - 1))));
587 #if defined(ITKV4_COMPATIBILITY)
588  progress.CompletedPixel();
589 #endif
590  }
591  }
592  }
593 }
594 
595 template <typename TInputImage, typename TOutputImage>
596 void
597 BoxSquareAccumulateFunction(const TInputImage * inputImage,
598  TOutputImage * outputImage,
599  typename TInputImage::RegionType inputRegion,
600  typename TOutputImage::RegionType outputRegion
601 #if defined(ITKV4_COMPATIBILITY)
602  ,
603  ProgressReporter & progress)
604 #else
605 )
606 #endif
607 {
608  // type alias
609  using InputImageType = TInputImage;
610  using OffsetType = typename TInputImage::OffsetType;
611  using OutputImageType = TOutputImage;
612  using OutputPixelType = typename TOutputImage::PixelType;
613  using ValueType = typename OutputPixelType::ValueType;
614  using InputPixelType = typename TInputImage::PixelType;
615 
616  using InputIterator = ImageRegionConstIterator<TInputImage>;
617 
618  using NOutputIterator = ShapedNeighborhoodIterator<TOutputImage>;
619  InputIterator inIt(inputImage, inputRegion);
620  typename TInputImage::SizeType kernelRadius;
621  kernelRadius.Fill(1);
622 
623  NOutputIterator noutIt(kernelRadius, outputImage, outputRegion);
624  // this iterator is fully connected
626 
629  noutIt.OverrideBoundaryCondition(&oBC);
630  // This uses several iterators. An alternative and probably better
631  // approach would be to copy the input to the output and convolve
632  // with the following weights (in 2D)
633  // -(dim - 1) 1
634  // 1 1
635  // The result of each convolution needs to get written back to the
636  // image being convolved so that the accumulation propagates
637  // This should be implementable with neighborhood operators.
638 
639  std::vector<int> weights;
640  typename NOutputIterator::ConstIterator sIt;
641  for (auto idxIt = noutIt.GetActiveIndexList().begin(); idxIt != noutIt.GetActiveIndexList().end(); idxIt++)
642  {
643  OffsetType offset = noutIt.GetOffset(*idxIt);
644  int w = -1;
645  for (unsigned int k = 0; k < InputImageType::ImageDimension; k++)
646  {
647  if (offset[k] != 0)
648  {
649  w *= offset[k];
650  }
651  }
652  weights.push_back(w);
653  }
654 
655  for (inIt.GoToBegin(), noutIt.GoToBegin(); !noutIt.IsAtEnd(); ++inIt, ++noutIt)
656  {
657  ValueType sum = 0;
658  ValueType squareSum = 0;
659  int k;
660  for (k = 0, sIt = noutIt.Begin(); !sIt.IsAtEnd(); ++sIt, ++k)
661  {
662  const OutputPixelType & v = sIt.Get();
663  sum += v[0] * weights[k];
664  squareSum += v[1] * weights[k];
665  }
666  OutputPixelType o;
667  const InputPixelType & i = inIt.Get();
668  o[0] = sum + i;
669  o[1] = squareSum + i * i;
670  noutIt.SetCenterPixel(o);
671 #if defined(ITKV4_COMPATIBILITY)
672  progress.CompletedPixel();
673 #endif
674  }
675 }
676 } // namespace itk
677 
678 #endif
itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator
Splits an image into a main region and several "face" regions which are used to handle computations o...
Definition: itkNeighborhoodAlgorithm.h:63
itkNeighborhoodAlgorithm.h
itk::BoxMeanCalculatorFunction
void BoxMeanCalculatorFunction(const TInputImage *accImage, TOutputImage *outputImage, typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion, typename TInputImage::SizeType radius)
Definition: itkBoxUtilities.h:207
itkOffset.h
itk::BoxSigmaCalculatorFunction
void BoxSigmaCalculatorFunction(const TInputImage *accImage, TOutputImage *outputImage, typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion, typename TInputImage::SizeType radius)
Definition: itkBoxUtilities.h:398
itkProgressReporter.h
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::Index::SetIndex
void SetIndex(const IndexValueType val[VDimension])
Definition: itkIndex.h:238
itk_impl_details::setConnectivityEarlyBox
TIterator * setConnectivityEarlyBox(TIterator *it, bool fullyConnected=false)
Definition: itkBoxUtilities.h:47
itk_impl_details
Definition: itkBoxUtilities.h:42
itkImageRegionIterator.h
itkImageRegionIteratorWithIndex.h
itk::ShapedNeighborhoodIterator
A neighborhood iterator which can take on an arbitrary shape.
Definition: itkShapedNeighborhoodIterator.h:153
itk::ProgressReporter::CompletedPixel
void CompletedPixel()
Definition: itkProgressReporter.h:96
itk::Size::Fill
void Fill(SizeValueType value)
Definition: itkSize.h:211
itkConstantBoundaryCondition.h
itk::BoxSquareAccumulateFunction
void BoxSquareAccumulateFunction(const TInputImage *inputImage, TOutputImage *outputImage, typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion)
Definition: itkBoxUtilities.h:597
itk::BoxAccumulateFunction
void BoxAccumulateFunction(const TInputImage *inputImage, const TOutputImage *outputImage, typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion)
Definition: itkBoxUtilities.h:100
itk::ImageRegionIterator
A multi-dimensional iterator templated over image type that walks a region of pixels.
Definition: itkImageRegionIterator.h:78
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ConstantBoundaryCondition
This boundary condition returns a constant value for out-of-bounds image pixels.
Definition: itkConstantBoundaryCondition.h:68
itk::Index::GetIndex
const IndexValueType * GetIndex() const
Definition: itkIndex.h:228
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::CornerOffsets
std::vector< typename TImage::OffsetType > CornerOffsets(const TImage *im)
Definition: itkBoxUtilities.h:175
itk::ConstantBoundaryCondition::SetConstant
void SetConstant(const OutputPixelType &c)
itk::ImageRegionIteratorWithIndex
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
Definition: itkImageRegionIteratorWithIndex.h:71
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:58
itkShapedNeighborhoodIterator.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::OffsetValueType
signed long OffsetValueType
Definition: itkIntTypes.h:94
itk::ImageRegion::SetIndex
void SetIndex(const IndexType &index)
Definition: itkImageRegion.h:153
itk::ImageRegionConstIterator
A multi-dimensional iterator templated over image type that walks a region of pixels.
Definition: itkImageRegionConstIterator.h:107
itk::ZeroFluxNeumannBoundaryCondition< TInputImage >
itk::ImageRegion::SetSize
void SetSize(const SizeType &size)
Definition: itkImageRegion.h:174
itk::ProgressReporter
Implements progress tracking for a filter.
Definition: itkProgressReporter.h:60
itk::GTest::TypedefsAndConstructors::Dimension2::Dimension
constexpr unsigned int Dimension
Definition: itkGTestTypedefsAndConstructors.h:44
itkZeroFluxNeumannBoundaryCondition.h
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83