Definition at line 463 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::WatershedMarkers(), and Impala::Core::Array::WriteRaw(). Referenced by mainIm(). 00464 { 00465 ILOG_VAR(Impala.Application.Im.DoWatershedMarkersVec3UInt8); 00466 CmdOptions& options = CmdOptions::GetInstance(); 00467 if (options.GetNrArg() < 6) 00468 { 00469 ILOG_ERROR("Need more arguments"); 00470 return; 00471 } 00472 Util::Database* db = &Util::Database::GetInstance(); 00473 00474 String dstName = options.GetArg(1); 00475 String srcName = options.GetArg(2); 00476 String maskName = options.GetArg(3); 00477 int conn = atol(options.GetArg(4)); 00478 int doLabel = atol(options.GetArg(5)); 00479 00480 Array2dVec3UInt8* srcData = 0; 00481 ReadRaw(srcData, srcName, db); 00482 Array2dScalarReal64* rData = 0; 00483 RGB2Intensity(rData, srcData); 00484 Array2dScalarInt32* intData = 0; 00485 Set(intData, rData); 00486 00487 ReadRaw(srcData, maskName, db); 00488 RGB2Intensity(rData, srcData); 00489 Array2dScalarInt32* mIntData = 0; 00490 Set(mIntData, rData); 00491 00492 Array2dScalarInt32* res = 0; 00493 WatershedMarkers(res, intData, mIntData, conn, doLabel != 0); 00494 WriteRaw(res, dstName, db, true); 00495 delete srcData; 00496 delete rData; 00497 delete res; 00498 }
Here is the call graph for this function:
|