Skip to content

Commit 221769e

Browse files
authored
Merge pull request #25 from jhlegarreta/FixOrtographyInComments
DOC: Fix spelling, capitalization mistakes in comments.
2 parents 64a352d + 0bedcd8 commit 221769e

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

include/itkCoocurrenceTextureFeaturesImageFilter.hxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ CoocurrenceTextureFeaturesImageFilter< TInputImage, TOutputImage >
5252
NeighborhoodType hood;
5353
hood.SetRadius( 1 );
5454

55-
// select all "previous" neighbors that are face+edge+vertex
56-
// connected to the iterated pixel. do not include the curentInNeighborhood pixel.
55+
// Select all "previous" neighbors that are face+edge+vertex
56+
// connected to the iterated pixel. Do not include the curentInNeighborhood pixel.
5757
unsigned int centerIndex = hood.GetCenterNeighborhoodIndex();
5858
OffsetVectorPointer offsets = OffsetVector::New();
5959
for( unsigned int d = 0; d < centerIndex; d++ )
@@ -116,7 +116,7 @@ void
116116
CoocurrenceTextureFeaturesImageFilter<TInputImage, TOutputImage>
117117
::AfterThreadedGenerateData()
118118
{
119-
// free internal image
119+
// Free internal image
120120
this->m_DigitalisedInputImageg = ITK_NULLPTR;
121121
}
122122

@@ -137,13 +137,13 @@ CoocurrenceTextureFeaturesImageFilter<TInputImage, TOutputImage>
137137
// Creation of the output pixel type
138138
typename TOutputImage::PixelType outputPixel;
139139

140-
// Separation of the non-boundery region that will be processed in a different way
140+
// Separation of the non-boundary region that will be processed in a different way
141141
NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< TInputImage > boundaryFacesCalculator;
142142
typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< InputImageType >::FaceListType
143143
faceList = boundaryFacesCalculator( this->m_DigitalisedInputImageg, outputRegionForThread, m_NeighborhoodRadius );
144144
typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< InputImageType >::FaceListType::iterator fit = faceList.begin();
145145

146-
// Declaration of the variables usefull to iterate over the all image region
146+
// Declaration of the variables useful to iterate over the all image region
147147
bool isInImage;
148148
IndexType firstIndex;
149149
for ( unsigned int i = 0; i < this->m_NeighborhoodRadius.Dimension; i++ )
@@ -153,17 +153,17 @@ CoocurrenceTextureFeaturesImageFilter<TInputImage, TOutputImage>
153153
outputPixel = outputPtr->GetPixel(firstIndex);
154154
typename OffsetVector::ConstIterator offsets;
155155

156-
// Declaration of the variables usefull to iterate over the all the offsets
156+
// Declaration of the variables useful to iterate over the all the offsets
157157
OffsetType offset;
158158
unsigned int totalNumberOfFreq;
159159

160160

161161
vnl_matrix<unsigned int> hist(m_NumberOfBinsPerAxis, m_NumberOfBinsPerAxis);
162162

163-
// Declaration of the variables usefull to iterate over the all neighborhood region
163+
// Declaration of the variables useful to iterate over the all neighborhood region
164164
PixelType curentInNeighborhoodPixelIntensity;
165165

166-
// Declaration of the variables usefull to iterate over the run
166+
// Declaration of the variables useful to iterate over the run
167167
PixelType pixelIntensity( NumericTraits<PixelType>::ZeroValue() );
168168
OffsetType tempOffset;
169169

@@ -196,7 +196,7 @@ CoocurrenceTextureFeaturesImageFilter<TInputImage, TOutputImage>
196196
// Iteration over the all neighborhood region
197197
for(NeighborIndexType nb = 0; nb<inputNIt.Size(); ++nb)
198198
{
199-
// Test if the curent voxel is in the mask and is the range of the image intensity sepcified
199+
// Test if the curent voxel is in the mask and is the range of the image intensity specified
200200
curentInNeighborhoodPixelIntensity = inputNIt.GetPixel(nb);
201201
if( curentInNeighborhoodPixelIntensity < 0 )
202202
{
@@ -220,19 +220,19 @@ CoocurrenceTextureFeaturesImageFilter<TInputImage, TOutputImage>
220220
}
221221
}
222222

223-
// Test if the pointed voxel is in the mask and is the range of the image intensity sepcified
223+
// Test if the pointed voxel is in the mask and is the range of the image intensity specified
224224
pixelIntensity = inputNIt.GetPixel(tempOffset);
225225
if(pixelIntensity< 0 )
226226
{
227227
continue;
228228
}
229229

230-
// Increase the coresponding bin in the histogram
230+
// Increase the corresponding bin in the histogram
231231
totalNumberOfFreq++;
232232
hist[curentInNeighborhoodPixelIntensity][pixelIntensity]++;
233233
}
234234
}
235-
// Compute the run lenght features
235+
// Compute the run length features
236236
this->ComputeFeatures( hist, totalNumberOfFreq, outputPixel);
237237
outputIt.Set(outputPixel);
238238

@@ -314,7 +314,7 @@ CoocurrenceTextureFeaturesImageFilter<TInputImage, TOutputImage>
314314
marginalDevSquared,
315315
pixelVariance);
316316

317-
// Finally compute the texture features. Another one pass.
317+
// Finally compute the texture features. Another pass.
318318
MeasurementType energy = NumericTraits< MeasurementType >::ZeroValue();
319319
MeasurementType entropy = NumericTraits< MeasurementType >::ZeroValue();
320320
MeasurementType correlation = NumericTraits< MeasurementType >::ZeroValue();

include/itkRunLengthTextureFeaturesImageFilter.hxx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ RunLengthTextureFeaturesImageFilter< TInputImage, TOutputImage >
4646
NeighborhoodType hood;
4747
hood.SetRadius( 1 );
4848

49-
// select all "previous" neighbors that are face+edge+vertex
50-
// connected to the iterated pixel. do not include the curentInNeighborhood pixel.
49+
// Select all "previous" neighbors that are face+edge+vertex
50+
// connected to the iterated pixel. Do not include the curentInNeighborhood pixel.
5151
unsigned int centerIndex = hood.GetCenterNeighborhoodIndex();
5252
OffsetVectorPointer offsets = OffsetVector::New();
5353
for( unsigned int d = 0; d < centerIndex; d++ )
@@ -107,7 +107,7 @@ RunLengthTextureFeaturesImageFilter<TInputImage, TOutputImage>
107107
}
108108
m_Spacing = this->GetInput()->GetSpacing();
109109

110-
// Support VectorImages by setting number of components on output.
110+
// Support VectorImages by setting the number of components on the output.
111111
typename TOutputImage::Pointer outputPtr = TOutputImage::New();
112112
outputPtr = this->GetOutput();
113113
if ( strcmp(outputPtr->GetNameOfClass(), "VectorImage") == 0 )
@@ -124,7 +124,7 @@ RunLengthTextureFeaturesImageFilter<TInputImage, TOutputImage>
124124
::ThreadedGenerateData(const OutputRegionType & outputRegionForThread,
125125
ThreadIdType threadId)
126126
{
127-
// Recuperation of the different inputs/outputs
127+
// Get the inputs/outputs
128128
typename TOutputImage::Pointer outputPtr = TOutputImage::New();
129129
outputPtr = this->GetOutput();
130130

@@ -135,8 +135,8 @@ RunLengthTextureFeaturesImageFilter<TInputImage, TOutputImage>
135135
// Creation of the output pixel type
136136
typename TOutputImage::PixelType outputPixel;
137137

138-
// Creation of a region with the same size than the neighborhood, this region
139-
// will be used to check if each voxel has already been visited
138+
// Creation of a region with the same size as the neighborhood. This region
139+
// will be used to check if each voxel has already been visited.
140140
InputRegionType boolRegion;
141141
typename InputRegionType::IndexType boolStart;
142142
typename InputRegionType::SizeType boolSize;
@@ -155,18 +155,18 @@ RunLengthTextureFeaturesImageFilter<TInputImage, TOutputImage>
155155
alreadyVisitedImage->SetRegions( boolRegion );
156156
alreadyVisitedImage->Allocate();
157157

158-
// Separation of the non-boundery region that will be processed in a different way
158+
// Separation of the non-boundary region that will be processed in a different way
159159
NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< TInputImage > boundaryFacesCalculator;
160160
typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< InputImageType >::FaceListType
161161
faceList = boundaryFacesCalculator( this->m_DigitalisedInputImageg, outputRegionForThread, m_NeighborhoodRadius );
162162
typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< InputImageType >::FaceListType::iterator fit = faceList.begin();
163163

164-
// Declaration of the variables usefull to iterate over the all image region
164+
// Declaration of the variables useful to iterate over the all image region
165165
bool isInImage;
166166
outputPixel = outputPtr->GetPixel(boolCurentInNeighborhoodIndex);
167167
typename OffsetVector::ConstIterator offsets;
168168

169-
// Declaration of the variables usefull to iterate over the all the offsets
169+
// Declaration of the variables useful to iterate over the all the offsets
170170
OffsetType offset;
171171
unsigned int totalNumberOfRuns;
172172
unsigned int **hist = new unsigned int*[m_NumberOfBinsPerAxis];
@@ -175,10 +175,10 @@ RunLengthTextureFeaturesImageFilter<TInputImage, TOutputImage>
175175
hist[a] = new unsigned int[m_NumberOfBinsPerAxis];
176176
}
177177

178-
// Declaration of the variables usefull to iterate over the all neighborhood region
178+
// Declaration of the variables useful to iterate over the all neighborhood region
179179
PixelType curentInNeighborhoodPixelIntensity;
180180

181-
// Declaration of the variables usefull to iterate over the run
181+
// Declaration of the variables useful to iterate over the run
182182
PixelType pixelIntensity( NumericTraits<PixelType>::ZeroValue() );
183183
OffsetType iteratedOffset;
184184
OffsetType tempOffset;
@@ -223,13 +223,13 @@ RunLengthTextureFeaturesImageFilter<TInputImage, TOutputImage>
223223
{
224224
curentInNeighborhoodPixelIntensity = inputNIt.GetPixel(nb);
225225
tempOffset = inputNIt.GetOffset(nb);
226-
// Cecking if the value is out-of-bounds or is outside the mask.
227-
if( curentInNeighborhoodPixelIntensity < 0 || //the pixel is outside of the mask or outside of bounds
226+
// Checking if the value is out-of-bounds or is outside the mask.
227+
if( curentInNeighborhoodPixelIntensity < 0 || // The pixel is outside of the mask or outside of bounds
228228
alreadyVisitedImage->GetPixel( boolCurentInNeighborhoodIndex + tempOffset) )
229229
{
230230
continue;
231231
}
232-
//Initialisation of the variables usefull to iterate over the run
232+
//Initialisation of the variables useful to iterate over the run
233233
iteratedOffset = tempOffset + offset;
234234
pixelDistance = 0;
235235
insideNeighborhood = this->IsInsideNeighborhood(iteratedOffset);
@@ -263,13 +263,13 @@ RunLengthTextureFeaturesImageFilter<TInputImage, TOutputImage>
263263
break;
264264
}
265265
}
266-
// Increase the coresponding bin in the histogram
266+
// Increase the corresponding bin in the histogram
267267
this->IncreaseHistogram(hist, totalNumberOfRuns,
268268
curentInNeighborhoodPixelIntensity,
269269
offset, pixelDistance);
270270
}
271271
}
272-
// Compute the run lenght features
272+
// Compute the run length features
273273
this->ComputeFeatures( hist, totalNumberOfRuns, outputPixel);
274274
outputIt.Set(outputPixel);
275275

@@ -450,11 +450,11 @@ RunLengthTextureFeaturesImageFilter<TInputImage, TOutputImage>
450450
greyLevelNonuniformityVector[a] += frequency;
451451
runLengthNonuniformityVector[b] += frequency;
452452

453-
// measures from Chu et al.
453+
// Measures from Chu et al.
454454
lowGreyLevelRunEmphasis += ( frequency / i2 );
455455
highGreyLevelRunEmphasis += ( frequency * i2 );
456456

457-
// measures from Dasarathy and Holder
457+
// Measures from Dasarathy and Holder
458458
shortRunLowGreyLevelEmphasis += ( frequency / ( i2 * j2 ) );
459459
shortRunHighGreyLevelEmphasis += ( frequency * i2 / j2 );
460460
longRunLowGreyLevelEmphasis += ( frequency * j2 / i2 );

0 commit comments

Comments
 (0)