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