Skip to content
Snippets Groups Projects
Commit 22ca1635 authored by Julien Malik's avatar Julien Malik
Browse files

ENH: make the code compatible with results from Insight Journal article

parent 1a374be2
No related branches found
No related tags found
No related merge requests found
......@@ -77,6 +77,7 @@ namespace itk {
typename OffsetVector::ConstIterator offsets;
for(offsets = m_Offsets->Begin(); offsets != m_Offsets->End(); offsets++)
{
for(unsigned int i = 0; i < offsets.Value().GetOffsetDimension(); i++)
{
unsigned int distance = vnl_math_abs(offsets.Value()[i]);
......@@ -103,14 +104,6 @@ namespace itk {
// Iterate over all of those pixels and offsets, adding each
// co-occurrence pair to the histogram
/*
typedef ConstNeighborhoodIterator<ImageType> NeighborhoodIteratorType;
typename NeighborhoodIteratorType::RadiusType radius;
radius.Fill( 1 );
NeighborhoodIteratorType neighborIt( radius,
this->m_Input, this->m_Input->GetRequestedRegion() );
*/
typedef ConstNeighborhoodIterator<ImageType> NeighborhoodIteratorType;
NeighborhoodIteratorType neighborIt;
neighborIt = NeighborhoodIteratorType( radius, this->m_Input, region );
......@@ -129,6 +122,8 @@ namespace itk {
neighborIt.GoToBegin();
OffsetType offset = offsets.Value();
offset[0] = -offset[0];
offset[1] = -offset[1];
for ( neighborIt.GoToBegin(); !neighborIt.IsAtEnd(); ++neighborIt )
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment