Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
ec5dd058
Commit
ec5dd058
authored
Oct 31, 2008
by
Emmanuel Christophe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
STYLE: align
parent
8f7c31c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
23 deletions
+22
-23
Code/BasicFilters/otbConvolutionImageFilter.txx
Code/BasicFilters/otbConvolutionImageFilter.txx
+22
-23
No files found.
Code/BasicFilters/otbConvolutionImageFilter.txx
View file @
ec5dd058
...
@@ -122,9 +122,9 @@ ConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition>
...
@@ -122,9 +122,9 @@ ConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition>
// Process each of the boundary faces. These are N-d regions which border
// Process each of the boundary faces. These are N-d regions which border
// the edge of the buffer.
// the edge of the buffer.
for (fit=faceList.begin(); fit != faceList.end(); ++fit)
for (fit=faceList.begin(); fit != faceList.end(); ++fit)
{
{
bit = itk::ConstNeighborhoodIterator<InputImageType>(m_Radius,
bit = itk::ConstNeighborhoodIterator<InputImageType>(m_Radius,
input, *fit);
input, *fit);
it = itk::ImageRegionIterator<OutputImageType>(output, *fit);
it = itk::ImageRegionIterator<OutputImageType>(output, *fit);
bit.OverrideBoundaryCondition(&nbc);
bit.OverrideBoundaryCondition(&nbc);
...
@@ -132,31 +132,30 @@ ConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition>
...
@@ -132,31 +132,30 @@ ConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition>
unsigned int neighborhoodSize = bit.Size();
unsigned int neighborhoodSize = bit.Size();
while ( ! bit.IsAtEnd() )
while ( ! bit.IsAtEnd() )
{
sum = itk::NumericTraits<InputRealType>::Zero;
norm = itk::NumericTraits<InputRealType>::Zero;
for (i = 0; i < neighborhoodSize; ++i)
{
{
sum = itk::NumericTraits<InputRealType>::Zero;
sum += static_cast<InputRealType>( bit.GetPixel(i)*m_Filter(i) );
norm = itk::NumericTraits<InputRealType>::Zero;
norm += static_cast<InputRealType>( m_Filter(i) );
for (i = 0; i < neighborhoodSize; ++i)
}
{
sum += static_cast<InputRealType>( bit.GetPixel(i)*m_Filter(i) );
norm += static_cast<InputRealType>( m_Filter(i) );
}
// get the mean value
if (m_NormalizeFilter)
{
it.Set( static_cast<OutputPixelType>(sum / double(norm)) );
}
else
{
it.Set( static_cast<OutputPixelType>(sum));
}
++bit;
// get the mean value
++it;
if (m_NormalizeFilter)
progress.CompletedPixel();
{
it.Set( static_cast<OutputPixelType>(sum / double(norm)) );
}
}
else
{
it.Set( static_cast<OutputPixelType>(sum));
}
++bit;
++it;
progress.CompletedPixel();
}
}
}
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment