Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

template<class VecPointT>
void Impala::Core::Array::Pattern::FuncQueueBased_ComputeNeighbors ( VecPointT &  neighborCoordinates,
int  connectivity,
int  radiusSqr 
)

Definition at line 96 of file FuncQueueBased.h.

Referenced by FuncQueueBasedDispatch().

00098 {
00099     neighborCoordinates.clear();
00100     if (radiusSqr<0 && connectivity==4)
00101         radiusSqr = 1;
00102     if (radiusSqr<0 && connectivity==8)
00103         radiusSqr = 2;
00104 
00105     int radius;
00106     for (radius=0 ; radius*radius <= radiusSqr ; radius++)
00107         ;
00108     for (int y=-radius ; y<=radius ; y++)
00109     {
00110         for (int x=-radius ; x<=radius ; x++)
00111         {
00112             if (x||y)
00113             { //skip (0,0,0)
00114                 if (x*x+y*y <= radiusSqr)
00115                     neighborCoordinates.push_back(Geometry::PointZ(x,y));
00116             }
00117         }
00118     }
00119 }


Generated on Fri Mar 19 11:01:40 2010 for ImpalaSrc by  doxygen 1.5.1