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