ITK  5.4.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  * https://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  FaceCalculatorType faceCalculator;
230 
232 
233  // this process is actually slightly asymmetric because we need to
234  // subtract rectangles that are next to our kernel, not overlapping it
235  SizeType kernelSize;
236  SizeType internalRadius;
237  SizeType regionLimit;
238 
239  IndexType regionStart = inputRegion.GetIndex();
240  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
241  {
242  kernelSize[i] = radius[i] * 2 + 1;
243  internalRadius[i] = radius[i] + 1;
244  regionLimit[i] = inputRegion.GetSize()[i] + regionStart[i] - 1;
245  }
246 
247  using AccPixType = typename NumericTraits<OutputPixelType>::RealType;
248  // get a set of offsets to corners for a unit hypercube in this image
249  std::vector<OffsetType> unitCorners = CornerOffsets<TInputImage>(accImage);
250  std::vector<OffsetType> realCorners;
251  std::vector<AccPixType> weights;
252  // now compute the weights
253  for (unsigned int k = 0; k < unitCorners.size(); ++k)
254  {
255  int prod = 1;
256  OffsetType thisCorner;
257  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
258  {
259  prod *= unitCorners[k][i];
260  if (unitCorners[k][i] > 0)
261  {
262  thisCorner[i] = radius[i];
263  }
264  else
265  {
266  thisCorner[i] = -(static_cast<OffsetValueType>(radius[i]) + 1);
267  }
268  }
269  weights.push_back((AccPixType)prod);
270  realCorners.push_back(thisCorner);
271  }
272 
273  FaceListType faceList = faceCalculator(accImage, outputRegion, internalRadius);
274  // start with the body region
275  for (const auto & face : faceList)
276  {
277  if (&face == &faceList.front())
278  {
279  // this is the body region. This is meant to be an optimized
280  // version that doesn't use neighborhood regions
281  // compute the various offsets
282  AccPixType pixelscount = 1;
283  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
284  {
285  pixelscount *= (AccPixType)(2 * radius[i] + 1);
286  }
287 
288  using OutputIteratorType = ImageRegionIterator<OutputImageType>;
289  using InputIteratorType = ImageRegionConstIterator<InputImageType>;
290 
291  using CornerItVecType = std::vector<InputIteratorType>;
292  CornerItVecType cornerItVec;
293  // set up the iterators for each corner
294  for (unsigned int k = 0; k < realCorners.size(); ++k)
295  {
296  typename InputImageType::RegionType tReg = face;
297  tReg.SetIndex(tReg.GetIndex() + realCorners[k]);
298  InputIteratorType tempIt(accImage, tReg);
299  tempIt.GoToBegin();
300  cornerItVec.push_back(tempIt);
301  }
302  // set up the output iterator
303  OutputIteratorType oIt(outputImage, face);
304  // now do the work
305  for (oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt)
306  {
307  AccPixType sum = 0;
308  // check each corner
309  for (unsigned int k = 0; k < cornerItVec.size(); ++k)
310  {
311  sum += weights[k] * cornerItVec[k].Get();
312  // increment each corner iterator
313  ++(cornerItVec[k]);
314  }
315  oIt.Set(static_cast<OutputPixelType>(sum / pixelscount));
316 #if defined(ITKV4_COMPATIBILITY)
317  progress.CompletedPixel();
318 #endif
319  }
320  }
321  else
322  {
323  // now we need to deal with the border regions
324  using OutputIteratorType = ImageRegionIteratorWithIndex<OutputImageType>;
325  OutputIteratorType oIt(outputImage, face);
326  // now do the work
327  for (oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt)
328  {
329  // figure out the number of pixels in the box by creating an
330  // equivalent region and cropping - this could probably be
331  // included in the loop below.
332  RegionType currentKernelRegion;
333  currentKernelRegion.SetSize(kernelSize);
334  // compute the region's index
335  IndexType kernelRegionIdx = oIt.GetIndex();
336  IndexType centIndex = kernelRegionIdx;
337  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
338  {
339  kernelRegionIdx[i] -= radius[i];
340  }
341  currentKernelRegion.SetIndex(kernelRegionIdx);
342  currentKernelRegion.Crop(inputRegion);
343  OffsetValueType edgepixelscount = currentKernelRegion.GetNumberOfPixels();
344  AccPixType sum = 0;
345  // rules are : for each corner,
346  // for each dimension
347  // if dimension offset is positive -> this is
348  // a leading edge. Crop if outside the input
349  // region
350  // if dimension offset is negative -> this is
351  // a trailing edge. Ignore if it is outside
352  // image region
353  for (unsigned int k = 0; k < realCorners.size(); ++k)
354  {
355  IndexType thisCorner = centIndex + realCorners[k];
356  bool includeCorner = true;
357  for (unsigned int j = 0; j < TInputImage::ImageDimension; ++j)
358  {
359  if (unitCorners[k][j] > 0)
360  {
361  // leading edge - crop it
362  if (thisCorner[j] > static_cast<OffsetValueType>(regionLimit[j]))
363  {
364  thisCorner[j] = static_cast<OffsetValueType>(regionLimit[j]);
365  }
366  }
367  else
368  {
369  // trailing edge - check bounds
370  if (thisCorner[j] < regionStart[j])
371  {
372  includeCorner = false;
373  break;
374  }
375  }
376  }
377  if (includeCorner)
378  {
379  sum += accImage->GetPixel(thisCorner) * weights[k];
380  }
381  }
382 
383  oIt.Set(static_cast<OutputPixelType>(sum / (AccPixType)edgepixelscount));
384 #if defined(ITKV4_COMPATIBILITY)
385  progress.CompletedPixel();
386 #endif
387  }
388  }
389  }
390 }
391 
392 template <typename TInputImage, typename TOutputImage>
393 void
394 BoxSigmaCalculatorFunction(const TInputImage * accImage,
395  TOutputImage * outputImage,
396  typename TInputImage::RegionType inputRegion,
397  typename TOutputImage::RegionType outputRegion,
398  typename TInputImage::SizeType radius
399 #if defined(ITKV4_COMPATIBILITY)
400  ,
401  ProgressReporter & progress)
402 #else
403 )
404 #endif
405 {
406  // type alias
407  using InputImageType = TInputImage;
408  using RegionType = typename TInputImage::RegionType;
409  using SizeType = typename TInputImage::SizeType;
410  using IndexType = typename TInputImage::IndexType;
411  using OffsetType = typename TInputImage::OffsetType;
412  using OutputImageType = TOutputImage;
413  using OutputPixelType = typename TOutputImage::PixelType;
414  using InputPixelType = typename TInputImage::PixelType;
415  // use the face generator for speed
417  using FaceListType = typename FaceCalculatorType::FaceListType;
418  FaceCalculatorType faceCalculator;
419 
421 
422  // this process is actually slightly asymmetric because we need to
423  // subtract rectangles that are next to our kernel, not overlapping it
424  SizeType kernelSize;
425  SizeType internalRadius;
426  SizeType regionLimit;
427  IndexType regionStart = inputRegion.GetIndex();
428  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
429  {
430  kernelSize[i] = radius[i] * 2 + 1;
431  internalRadius[i] = radius[i] + 1;
432  regionLimit[i] = inputRegion.GetSize()[i] + regionStart[i] - 1;
433  }
434 
435  using AccPixType = typename NumericTraits<OutputPixelType>::RealType;
436  // get a set of offsets to corners for a unit hypercube in this image
437  std::vector<OffsetType> unitCorners = CornerOffsets<TInputImage>(accImage);
438  std::vector<OffsetType> realCorners;
439  std::vector<AccPixType> weights;
440  // now compute the weights
441  for (unsigned int k = 0; k < unitCorners.size(); ++k)
442  {
443  int prod = 1;
444  OffsetType thisCorner;
445  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
446  {
447  prod *= unitCorners[k][i];
448  if (unitCorners[k][i] > 0)
449  {
450  thisCorner[i] = radius[i];
451  }
452  else
453  {
454  thisCorner[i] = -(static_cast<OffsetValueType>(radius[i]) + 1);
455  }
456  }
457  weights.push_back((AccPixType)prod);
458  realCorners.push_back(thisCorner);
459  }
460 
461  FaceListType faceList = faceCalculator(accImage, outputRegion, internalRadius);
462  // start with the body region
463  for (const auto & face : faceList)
464  {
465  if (&face == &faceList.front())
466  {
467  // this is the body region. This is meant to be an optimized
468  // version that doesn't use neighborhood regions
469  // compute the various offsets
470  AccPixType pixelscount = 1;
471  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
472  {
473  pixelscount *= (AccPixType)(2 * radius[i] + 1);
474  }
475 
476  using OutputIteratorType = ImageRegionIterator<OutputImageType>;
477  using InputIteratorType = ImageRegionConstIterator<InputImageType>;
478 
479  using CornerItVecType = std::vector<InputIteratorType>;
480  CornerItVecType cornerItVec;
481  // set up the iterators for each corner
482  for (unsigned int k = 0; k < realCorners.size(); ++k)
483  {
484  typename InputImageType::RegionType tReg = face;
485  tReg.SetIndex(tReg.GetIndex() + realCorners[k]);
486  InputIteratorType tempIt(accImage, tReg);
487  tempIt.GoToBegin();
488  cornerItVec.push_back(tempIt);
489  }
490  // set up the output iterator
491  OutputIteratorType oIt(outputImage, face);
492  // now do the work
493  for (oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt)
494  {
495  AccPixType sum = 0;
496  AccPixType squareSum = 0;
497  // check each corner
498  for (unsigned int k = 0; k < cornerItVec.size(); ++k)
499  {
500  const InputPixelType & i = cornerItVec[k].Get();
501  sum += weights[k] * i[0];
502  squareSum += weights[k] * i[1];
503  // increment each corner iterator
504  ++(cornerItVec[k]);
505  }
506 
507  oIt.Set(static_cast<OutputPixelType>(std::sqrt((squareSum - sum * sum / pixelscount) / (pixelscount - 1))));
508 #if defined(ITKV4_COMPATIBILITY)
509  progress.CompletedPixel();
510 #endif
511  }
512  }
513  else
514  {
515  // now we need to deal with the border regions
516  using OutputIteratorType = ImageRegionIteratorWithIndex<OutputImageType>;
517  OutputIteratorType oIt(outputImage, face);
518  // now do the work
519  for (oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt)
520  {
521  // figure out the number of pixels in the box by creating an
522  // equivalent region and cropping - this could probably be
523  // included in the loop below.
524  RegionType currentKernelRegion;
525  currentKernelRegion.SetSize(kernelSize);
526  // compute the region's index
527  IndexType kernelRegionIdx = oIt.GetIndex();
528  IndexType centIndex = kernelRegionIdx;
529  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
530  {
531  kernelRegionIdx[i] -= radius[i];
532  }
533  currentKernelRegion.SetIndex(kernelRegionIdx);
534  currentKernelRegion.Crop(inputRegion);
535  SizeValueType edgepixelscount = currentKernelRegion.GetNumberOfPixels();
536  AccPixType sum = 0;
537  AccPixType squareSum = 0;
538  // rules are : for each corner,
539  // for each dimension
540  // if dimension offset is positive -> this is
541  // a leading edge. Crop if outside the input
542  // region
543  // if dimension offset is negative -> this is
544  // a trailing edge. Ignore if it is outside
545  // image region
546  for (unsigned int k = 0; k < realCorners.size(); ++k)
547  {
548  IndexType thisCorner = centIndex + realCorners[k];
549  bool includeCorner = true;
550  for (unsigned int j = 0; j < TInputImage::ImageDimension; ++j)
551  {
552  if (unitCorners[k][j] > 0)
553  {
554  // leading edge - crop it
555  if (thisCorner[j] > static_cast<OffsetValueType>(regionLimit[j]))
556  {
557  thisCorner[j] = static_cast<OffsetValueType>(regionLimit[j]);
558  }
559  }
560  else
561  {
562  // trailing edge - check bounds
563  if (thisCorner[j] < regionStart[j])
564  {
565  includeCorner = false;
566  break;
567  }
568  }
569  }
570  if (includeCorner)
571  {
572  const InputPixelType & i = accImage->GetPixel(thisCorner);
573  sum += weights[k] * i[0];
574  squareSum += weights[k] * i[1];
575  }
576  }
577 
578  oIt.Set(
579  static_cast<OutputPixelType>(std::sqrt((squareSum - sum * sum / edgepixelscount) / (edgepixelscount - 1))));
580 #if defined(ITKV4_COMPATIBILITY)
581  progress.CompletedPixel();
582 #endif
583  }
584  }
585  }
586 }
587 
588 template <typename TInputImage, typename TOutputImage>
589 void
590 BoxSquareAccumulateFunction(const TInputImage * inputImage,
591  TOutputImage * outputImage,
592  typename TInputImage::RegionType inputRegion,
593  typename TOutputImage::RegionType outputRegion
594 #if defined(ITKV4_COMPATIBILITY)
595  ,
596  ProgressReporter & progress)
597 #else
598 )
599 #endif
600 {
601  // type alias
602  using InputImageType = TInputImage;
603  using OffsetType = typename TInputImage::OffsetType;
604  using OutputImageType = TOutputImage;
605  using OutputPixelType = typename TOutputImage::PixelType;
606  using ValueType = typename OutputPixelType::ValueType;
607  using InputPixelType = typename TInputImage::PixelType;
608 
609  using InputIterator = ImageRegionConstIterator<TInputImage>;
610 
611  using NOutputIterator = ShapedNeighborhoodIterator<TOutputImage>;
612  InputIterator inIt(inputImage, inputRegion);
613  typename TInputImage::SizeType kernelRadius;
614  kernelRadius.Fill(1);
615 
616  NOutputIterator noutIt(kernelRadius, outputImage, outputRegion);
617  // this iterator is fully connected
619 
622  noutIt.OverrideBoundaryCondition(&oBC);
623  // This uses several iterators. An alternative and probably better
624  // approach would be to copy the input to the output and convolve
625  // with the following weights (in 2D)
626  // -(dim - 1) 1
627  // 1 1
628  // The result of each convolution needs to get written back to the
629  // image being convolved so that the accumulation propagates
630  // This should be implementable with neighborhood operators.
631 
632  std::vector<int> weights;
633  typename NOutputIterator::ConstIterator sIt;
634  for (auto idxIt = noutIt.GetActiveIndexList().begin(); idxIt != noutIt.GetActiveIndexList().end(); ++idxIt)
635  {
636  OffsetType offset = noutIt.GetOffset(*idxIt);
637  int w = -1;
638  for (unsigned int k = 0; k < InputImageType::ImageDimension; ++k)
639  {
640  if (offset[k] != 0)
641  {
642  w *= offset[k];
643  }
644  }
645  weights.push_back(w);
646  }
647 
648  for (inIt.GoToBegin(), noutIt.GoToBegin(); !noutIt.IsAtEnd(); ++inIt, ++noutIt)
649  {
650  ValueType sum = 0;
651  ValueType squareSum = 0;
652  int k;
653  for (k = 0, sIt = noutIt.Begin(); !sIt.IsAtEnd(); ++sIt, ++k)
654  {
655  const OutputPixelType & v = sIt.Get();
656  sum += v[0] * weights[k];
657  squareSum += v[1] * weights[k];
658  }
659  OutputPixelType o;
660  const InputPixelType & i = inIt.Get();
661  o[0] = sum + i;
662  o[1] = squareSum + i * i;
663  noutIt.SetCenterPixel(o);
664 #if defined(ITKV4_COMPATIBILITY)
665  progress.CompletedPixel();
666 #endif
667  }
668 }
669 } // namespace itk
670 
671 #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:394
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:242
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:213
itkConstantBoundaryCondition.h
itk::BoxSquareAccumulateFunction
void BoxSquareAccumulateFunction(const TInputImage *inputImage, TOutputImage *outputImage, typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion)
Definition: itkBoxUtilities.h:590
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:232
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::OffsetValueType
long OffsetValueType
Definition: itkIntTypes.h:94
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:59
itkShapedNeighborhoodIterator.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
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