Definition at line 379 of file RegionDescriptor.h. References Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::BH(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::BW(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CH(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CW(), Impala::Core::Array::MakeRoi(), Impala::Core::Geometry::Rectangle::mBottom, Impala::Core::Geometry::Rectangle::mLeft, Impala::Core::Geometry::Rectangle::mRight, and Impala::Core::Geometry::Rectangle::mTop. Referenced by CalculateRegionDescriptors(). 00381 { 00382 Geometry::Rectangle regionRect(x - pixelsAround, y - pixelsAround, 00383 x + pixelsAround, y + pixelsAround); 00384 if((regionRect.mLeft < - img->BW()) || 00385 (regionRect.mTop < - img->BH()) || 00386 (regionRect.mRight >= img->CW() + img->BW()) || 00387 (regionRect.mBottom >= img->CH() + img->BH()) ) { 00388 00389 //std::cerr << "[WARNING] Decreased pixelsAround to 120 in MakePatch to avoid going beyond borders of image, value was " << pixelsAround << std::endl; 00390 00391 pixelsAround = 120; // this should always work 00392 regionRect.mLeft = x - pixelsAround; 00393 regionRect.mTop = y - pixelsAround; 00394 regionRect.mRight = x + pixelsAround; 00395 regionRect.mBottom = y + pixelsAround; 00396 /* 00397 std::cerr << "[WARNING] Segfault possible due to too small border in MakePatch!" << std::endl; 00398 std::cerr << regionRect.mLeft <<" "<< - img->BW() <<" "<< 00399 regionRect.mTop <<" "<< - img->BH() <<" "<< 00400 regionRect.mRight <<" "<< img->CW() + img->BW() <<" "<< 00401 regionRect.mBottom <<" "<< img->CH() + img->BH() << std::endl; 00402 std::cerr << "x=" << x << " y=" << y << " size=" << pixelsAround << std::endl; */ 00403 } 00404 patch = MakeRoi(img, regionRect); 00405 }
Here is the call graph for this function:
|