void VolumeIOHelper::loadURL(const std::string& url, VolumeReader* reader) { tgtAssert(reader, "null pointer passed"); try { std::vector<VolumeURL> origins = reader->listVolumes(url); if (origins.size() > 1) { // if more than one volume listed at URL, show listing dialog tgtAssert(volumeListingDialog_, "no volumelistingdialog"); volumeListingDialog_->setOrigins(origins, reader); volumeListingDialog_->show(); } else if (origins.size() == 1) { // load single volume directly loadOrigin(origins.front(), reader); } else { LWARNING("No volumes found at URL '" << url << "'"); QErrorMessage* errorMessageDialog = new QErrorMessage(VoreenApplicationQt::qtApp()->getMainWindow()); errorMessageDialog->showMessage(QString::fromStdString("No volumes found at '" + url + "'")); } } catch (const tgt::FileException& e) { LWARNING(e.what()); QErrorMessage* errorMessageDialog = new QErrorMessage(VoreenApplicationQt::qtApp()->getMainWindow()); errorMessageDialog->showMessage(e.what()); } }
void VolumeIOHelper::loadOrigins(const std::vector<VolumeURL>& origins, VolumeReader* reader) { tgtAssert(reader, "null pointer passed"); for (size_t i=0; i<origins.size(); i++) { loadOrigin(origins.at(i), reader); } }
void MapManager::secondary_map_cb(const nav_msgs::OccupancyGrid::ConstPtr& msg) { secondary_map = *msg; loadOrigin(); }