Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions include/itkLabelSetUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,10 @@ doOneDimensionErodeFirstPass(TInIter & inputIterator,
// restructure equation to reduce numerical error
// const RealType magnitude = (magnitudeSign * iscale * iscale)/(2.0 *
// sigma);
const RealType magnitude = (magnitudeSign * iscale * iscale) / (2.0);
LineBufferType lineBuf(lineLength, 0.0);
LabelBufferType labBuf(lineLength);
const RealType magnitude = (magnitudeSign * iscale * iscale) / (2.0);
const typename TInIter::PixelType initPixelValue = 0.0;
LineBufferType lineBuf(lineLength, 0.0);
LabelBufferType labBuf(lineLength, 0.0);

inputIterator.SetDirection(direction);
outputIterator.SetDirection(direction);
Expand Down Expand Up @@ -393,11 +394,13 @@ doOneDimensionDilateFirstPass(TInIter & inputIterator,
// restructure equation to reduce numerical error
// const RealType magnitude = (magnitudeSign * iscale * iscale)/(2.0 *
// sigma);
const RealType magnitude = (magnitudeSign * iscale * iscale) / (2.0);
LineBufferType lineBuf(lineLength);
LabelBufferType labBuf(lineLength);
LineBufferType tmpLineBuf(lineLength);
LabelBufferType newLabBuf(lineLength);
const RealType magnitude = (magnitudeSign * iscale * iscale) / (2.0);
const RealType initRealValue = 0.0;
const typename TInIter::PixelType initPixelValue = 0.0;
LineBufferType lineBuf(lineLength, initRealValue);
LabelBufferType labBuf(lineLength, initPixelValue);
LineBufferType tmpLineBuf(lineLength, initRealValue);
LabelBufferType newLabBuf(lineLength, initPixelValue);

inputIterator.SetDirection(direction);
outputIterator.SetDirection(direction);
Expand Down Expand Up @@ -476,8 +479,8 @@ doOneDimensionErode(TInIter & inputIterator,
iscale = imageScale;
}
const RealType magnitude = (magnitudeSign * iscale * iscale) / (2.0 * sigma);
LineBufferType lineBuf(lineLength);
LabelBufferType labBuf(lineLength);
LineBufferType lineBuf(lineLength, 0.0);
LabelBufferType labBuf(lineLength, 0.0);

inputIterator.SetDirection(direction);
outputDistIterator.SetDirection(direction);
Expand Down Expand Up @@ -618,11 +621,13 @@ doOneDimensionDilate(TInIter & inputIterator,
// restructure equation to reduce numerical error
const RealType magnitude = (magnitudeSign * iscale * iscale) / (2.0 * sigma);
// const RealType magnitude = (magnitudeSign * iscale * iscale)/(2.0 );
LineBufferType lineBuf(lineLength);
LabelBufferType labBuf(lineLength);
LineBufferType tmpLineBuf(lineLength);
LabelBufferType newLabBuf(lineLength);
LabelBufferType tmpLabBuf(lineLength);
const RealType initRealValue = 0.0;
const typename TInIter::PixelType initPixelValue = 0.0;
LineBufferType lineBuf(lineLength, initRealValue);
LabelBufferType labBuf(lineLength, initPixelValue);
LineBufferType tmpLineBuf(lineLength, initRealValue);
LabelBufferType newLabBuf(lineLength, initPixelValue);
LabelBufferType tmpLabBuf(lineLength, initPixelValue);

inputIterator.SetDirection(direction);
inputDistIterator.SetDirection(direction);
Expand Down
Loading