@@ -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