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