Definition at line 501 of file mainIm.cpp. References Impala::atol(), Impala::CmdOptions::GetArg(), Impala::Util::Database::GetInstance(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetNrArg(), ILOG_ERROR, ILOG_VAR, Impala::Core::Array::ReadRaw(), Impala::Core::Array::RGB2Intensity(), Impala::Core::Array::Set(), Impala::Core::Array::WatershedMarkers2(), and Impala::Core::Array::WriteRaw(). Referenced by mainIm(). 00502 { 00503 ILOG_VAR(Impala.Application.Im.DoWatershedMarkers2Vec3UInt8); 00504 CmdOptions& options = CmdOptions::GetInstance(); 00505 if (options.GetNrArg() < 7) 00506 { 00507 ILOG_ERROR("Need more arguments"); 00508 return; 00509 } 00510 Util::Database* db = &Util::Database::GetInstance(); 00511 00512 String dstName = options.GetArg(1); 00513 String srcName = options.GetArg(2); 00514 String maskName = options.GetArg(3); 00515 int conn = atol(options.GetArg(4)); 00516 int doLabel = atol(options.GetArg(5)); 00517 int costMethod = atol(options.GetArg(6)); 00518 00519 Array2dVec3UInt8* srcData = 0; 00520 ReadRaw(srcData, srcName, db); 00521 Array2dScalarReal64* rData = 0; 00522 RGB2Intensity(rData, srcData); 00523 Array2dScalarInt32* intData = 0; 00524 Set(intData, rData); 00525 00526 ReadRaw(srcData, maskName, db); 00527 RGB2Intensity(rData, srcData); 00528 Array2dScalarInt32* mIntData = 0; 00529 Set(mIntData, rData); 00530 00531 Array2dScalarInt32* res = 0; 00532 WatershedMarkers2(res, intData, mIntData, conn, doLabel != 0, costMethod); 00533 WriteRaw(res, dstName, db, true); 00534 delete srcData; 00535 delete rData; 00536 delete res; 00537 }
Here is the call graph for this function:
|