本文整理汇总了C++中LOG_ALL函数的典型用法代码示例。如果您正苦于以下问题:C++ LOG_ALL函数的具体用法?C++ LOG_ALL怎么用?C++ LOG_ALL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LOG_ALL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LOG_ALL
void
NeuronsStackView::updateOutputs() {
util::rect<double> oldSize = _painter->getSize();
if (_neuronsModified) {
_painter->setNeurons(_neurons);
_neuronsModified = false;
}
if (_currentNeuronModified) {
_painter->showNeuron(*_currentNeuron);
_currentNeuronModified = false;
}
util::rect<double> newSize = _painter->getSize();
if (oldSize == newSize) {
LOG_ALL(neuronsstackviewlog) << "neurons size did not change -- sending ContentChanged" << std::endl;
_contentChanged();
} else {
LOG_ALL(neuronsstackviewlog) << "neurons size did change -- sending SizeChanged" << std::endl;
_sizeChanged();
}
}
示例2: LOG_ALL
void
SegmentsStackView::updateOutputs() {
util::rect<double> oldSize = _painter->getSize();
// set new or modified segments
if (_segmentsModified) {
_painter->setSegments(_segments);
_segmentsModified = false;
}
// query visible segments
_painter->getVisibleSegments(*_visibleSegments);
LOG_ALL(segmentsstackviewlog) << "there are " << _visibleSegments->size() << " visible segments" << std::endl;
// get new size of painter
util::rect<double> newSize = _painter->getSize();
if (oldSize == newSize) {
LOG_ALL(segmentsstackviewlog) << "segments size did not change -- sending ContentChanged" << std::endl;
_contentChanged();
} else {
LOG_ALL(segmentsstackviewlog) << "segments size did change -- sending SizeChanged" << std::endl;
_sizeChanged();
}
}
示例3: LOG_ALL
void
Reconstructor::updateReconstruction() {
// remove all previous segment in the reconstruction
_reconstruction->clear();
_discardedSegments->clear();
LOG_ALL(reconstructorlog) << "Solution consists of segments: ";
_currentSegmentNum = 0;
foreach (boost::shared_ptr<EndSegment> segment, _segments->getEnds())
probe(segment);
foreach (boost::shared_ptr<ContinuationSegment> segment, _segments->getContinuations())
probe(segment);
foreach (boost::shared_ptr<BranchSegment> segment, _segments->getBranches())
probe(segment);
foreach (boost::shared_ptr<SegmentPair> segment, _segments->getSegmentPairs())
probe(segment);
foreach (boost::shared_ptr<SegmentPairEnd> segment, _segments->getSegmentPairEnds())
probe(segment);
LOG_ALL(reconstructorlog) << std::endl;
}
示例4: LOG_ALL
void
ImageStackView::updateOutputs() {
util::rect<double> oldSize = _painter->getSize();
_painter->setImageStack(_stack);
_painter->setCurrentSection(_section);
util::rect<double> newSize = _painter->getSize();
if (oldSize == newSize) {
LOG_ALL(imagestackviewlog) << "image size did not change -- sending ContentChanged" << std::endl;
_contentChanged();
} else {
LOG_ALL(imagestackviewlog) << "image size did change -- sending SizeChanged" << std::endl;
_sizeChanged();
}
if (_stack->size() == 0)
return;
// prepare current image data
_currentImageData.reshape(vigra::MultiArray<2, float>::size_type(_stack->width(), _stack->height()));
// copy current image data
_currentImageData = *(*_stack)[_section];
// set content of output
*_currentImage = _currentImageData;
}
示例5: LOG_DEBUG
void
SegmentFeaturesExtractor::FeaturesAssembler::updateOutputs() {
LOG_DEBUG(segmentfeaturesextractorlog) << "assembling features from " << _features.size() << " feature groups" << std::endl;
_allFeatures->clear();
foreach (boost::shared_ptr<Features> features, _features) {
LOG_ALL(segmentfeaturesextractorlog) << "processing feature group" << std::endl << std::endl << *features << std::endl;
foreach (const std::string& name, features->getNames()) {
LOG_ALL(segmentfeaturesextractorlog) << "adding name " << name << std::endl;
_allFeatures->addName(name);
}
if (_allFeatures->size() == 0) {
LOG_ALL(segmentfeaturesextractorlog) << "initialising all features with " << features->size() << " feature vectors from current feature group" << std::endl;
unsigned int numFeatures = (features->size() > 0 ? (*features)[0].size() : 0);
_allFeatures->resize(features->size(), numFeatures);
unsigned int i = 0;
foreach (const std::vector<double>& feature, *features) {
std::copy(feature.begin(), feature.end(), (*_allFeatures)[i].begin());
i++;
}
} else {
示例6: _haveBackgroundLabel
TolerantEditDistance::TolerantEditDistance() :
_haveBackgroundLabel(optionHaveBackgroundLabel),
_gtBackgroundLabel(optionGroundTruthBackgroundLabel),
_recBackgroundLabel(optionReconstructionBackgroundLabel),
_correctedReconstruction(new ImageStack()),
_splitLocations(new ImageStack()),
_mergeLocations(new ImageStack()),
_fpLocations(new ImageStack()),
_fnLocations(new ImageStack()),
_errors(_haveBackgroundLabel ? new Errors(_gtBackgroundLabel, _recBackgroundLabel) : new Errors()) {
if (optionHaveBackgroundLabel) {
LOG_ALL(tedlog) << "started TolerantEditDistance with background label" << std::endl;
} else {
LOG_ALL(tedlog) << "started TolerantEditDistance without background label" << std::endl;
}
registerInput(_groundTruth, "ground truth");
registerInput(_reconstruction, "reconstruction");
registerOutput(_correctedReconstruction, "corrected reconstruction");
registerOutput(_splitLocations, "splits");
registerOutput(_mergeLocations, "merges");
registerOutput(_fpLocations, "false positives");
registerOutput(_fnLocations, "false negatives");
registerOutput(_errors, "errors");
_toleranceFunction = new DistanceToleranceFunction(optionToleranceDistanceThreshold.as<float>(), _haveBackgroundLabel, _recBackgroundLabel);
}
示例7: LOG_ALL
void
SwitchImpl::onMouseMove(MouseMove& signal) {
LOG_ALL(switchlog) << "mouse moved at " << signal.position << std::endl;
const util::rect<double>& size = _painter->getSize();
if (size.contains(signal.position)) {
LOG_ALL(switchlog) << "...inside switch" << std::endl;
if (_mouseOver == false) {
_mouseOver = true;
_painter->setHighlight(true);
setDirty(_painter);
}
} else {
LOG_ALL(switchlog) << "...outside switch" << std::endl;
if (_mouseOver == true) {
_mouseOver = false;
_painter->setHighlight(false);
setDirty(_painter);
}
}
}
示例8: timer
void
Reconstructor::updateReconstruction() {
boost::timer::auto_cpu_timer timer("\tReconstructor::updateReconstruction():\t%ws\n");
// remove all previous segment in the reconstruction
_reconstruction->clear();
_reconstruction->setResolution(
_segments->getResolutionX(),
_segments->getResolutionY(),
_segments->getResolutionZ());
_discardedSegments->clear();
_discardedSegments->setResolution(
_segments->getResolutionX(),
_segments->getResolutionY(),
_segments->getResolutionZ());
LOG_ALL(reconstructorlog) << "Solution consists of segments: ";
_currentSegmentNum = 0;
foreach (boost::shared_ptr<EndSegment> segment, _segments->getEnds())
probe(segment);
foreach (boost::shared_ptr<ContinuationSegment> segment, _segments->getContinuations())
probe(segment);
foreach (boost::shared_ptr<BranchSegment> segment, _segments->getBranches())
probe(segment);
LOG_ALL(reconstructorlog) << std::endl;
}
示例9: LOG_DEBUG
void
SegmentExtractor::extractSegments() {
LOG_DEBUG(segmentextractorlog)
<< "previous sections contains " << _prevSlices->size() << " slices,"
<< "next sections contains " << _nextSlices->size() << " slices" << std::endl;
LOG_ALL(segmentextractorlog) << "Branch overlap threshold: " << _branchOverlapThreshold << std::endl;
LOG_ALL(segmentextractorlog) << "Branch size ratio threshold: " << _branchSizeRatioThreshold << std::endl;
buildOverlapMap();
unsigned int oldSize = 0;
LOG_DEBUG(segmentextractorlog) << "extracting segments..." << std::endl;
LOG_DEBUG(segmentextractorlog) << "extracting continuations to next section..." << std::endl;
// for all slices in previous section...
for (unsigned int i = 0; i < _prevSlices->size(); i++) {
LOG_ALL(segmentextractorlog) << "found " << _nextOverlaps[i].size() << " partners" << std::endl;
// ...and all overlapping slices in the next section...
unsigned int j, overlap;
foreach (boost::tie(overlap, j), _nextOverlaps[i]) {
// ...try to extract the segment
extractSegment((*_prevSlices)[i], (*_nextSlices)[j], overlap);
}
}
示例10: LOG_ALL
void
ImageStackPainter::setCurrentSection(unsigned int section) {
if (_showColored)
return;
if (!_stack || _stack->size() == 0 || _imagePainters.size() == 0)
return;
_section = std::min(section, _stack->size() - 1);
for (unsigned int i = 0; i < _numImages; i++) {
int imageIndex = std::max(std::min(static_cast<int>(_section) + static_cast<int>(i - _numImages/2), static_cast<int>(_stack->size()) - 1), 0);
LOG_ALL(imagestackpainterlog) << "index for image " << i << " is " << imageIndex << std::endl;
_imagePainters[i]->setImage((*_stack)[imageIndex]);
if ((*_stack)[imageIndex]->getIdentifier() != "")
LOG_USER(imagestackpainterlog) << "showing image " << (*_stack)[imageIndex]->getIdentifier() << std::endl;
}
util::rect<double> size = _imagePainters[0]->getSize();
_imageHeight = size.height();
size.minY -= _numImages/2*_imageHeight + _numImages*_gap/2;
size.maxY += (_numImages/2 - (_numImages + 1)%2)*_imageHeight + _numImages*_gap/2;
setSize(size);
LOG_ALL(imagestackpainterlog) << "current section set to " << _section << std::endl;
}
示例11: LOG_ALL
void
ContainerPainter::remove(boost::shared_ptr<Painter> painter) {
LOG_ALL(containerpainterlog) << "removing painter " << typeName(*painter) << std::endl;
{
// get a write lock
boost::unique_lock<boost::shared_mutex> lock(_paintersMutex);
// remove painter from list
for (std::vector<content_type>::iterator i = _content.begin(); i != _content.end(); i++) {
if ((*i).first == painter) {
_content.erase(i);
LOG_ALL(containerpainterlog) << "removed." << std::endl;
break;
}
}
}
// update size of this painter
updateSize();
}
示例12: _openGl
OpenGl::Guard::Guard(GlContextCreator* contextCreator) :
_openGl(getInstance()) {
LOG_ALL(opengllog) << "[Guard] creating new factory guard" << std::endl;
if (contextCreator == 0) {
LOG_ALL(opengllog) << "[Guard] destructing current thread's context" << std::endl;
invalidateCurrentContext();
_deactivateContext = false;
return;
}
LOG_ALL(opengllog) << "[Guard] ensuring valid context" << std::endl;
// remember to deactivate the context on destruction
_deactivateContext = true;
if (getPreviousContextCreator() == contextCreator && reusePreviousContext()) {
LOG_ALL(opengllog) << "[Guard] could reuse previous context from the same creator" << std::endl;
return;
} else {
LOG_ALL(opengllog) << "[Guard] previous context not present or invalid -- create a new one" << std::endl;
createNewContex(contextCreator);
}
}
示例13: BOOST_THROW_EXCEPTION
void
TolerantEditDistance::extractCells() {
if (_groundTruth->size() != _reconstruction->size())
BOOST_THROW_EXCEPTION(SizeMismatchError() << error_message("ground truth and reconstruction have different size") << STACK_TRACE);
if (_groundTruth->height() != _reconstruction->height() || _groundTruth->width() != _reconstruction->width())
BOOST_THROW_EXCEPTION(SizeMismatchError() << error_message("ground truth and reconstruction have different size") << STACK_TRACE);
_depth = _groundTruth->size();
_width = _groundTruth->width();
_height = _groundTruth->height();
LOG_ALL(tedlog) << "extracting cells in " << _width << "x" << _height << "x" << _depth << " volume" << std::endl;
vigra::MultiArray<3, std::pair<float, float> > gtAndRec(vigra::Shape3(_width, _height, _depth));
vigra::MultiArray<3, unsigned int> cellIds(vigra::Shape3(_width, _height, _depth));
// prepare gt and rec image
for (unsigned int z = 0; z < _depth; z++) {
boost::shared_ptr<Image> gt = (*_groundTruth)[z];
boost::shared_ptr<Image> rec = (*_reconstruction)[z];
for (unsigned int x = 0; x < _width; x++)
for (unsigned int y = 0; y < _height; y++) {
float gtLabel = (*gt)(x, y);
float recLabel = (*rec)(x, y);
gtAndRec(x, y, z) = std::make_pair(gtLabel, recLabel);
}
}
// find connected components in gt and rec image
cellIds = 0;
_numCells = vigra::labelMultiArray(gtAndRec, cellIds);
LOG_DEBUG(tedlog) << "found " << _numCells << " cells" << std::endl;
// let tolerance function extract cells from that
_toleranceFunction->extractCells(
_numCells,
cellIds,
*_reconstruction,
*_groundTruth);
LOG_ALL(tedlog)
<< "found "
<< _toleranceFunction->getGroundTruthLabels().size()
<< " ground truth labels and "
<< _toleranceFunction->getReconstructionLabels().size()
<< " reconstruction labels"
<< std::endl;
}
示例14: ImageStack
void
SubStackSelector::updateOutputs() {
if (!_subStack)
_subStack = new ImageStack();
LOG_ALL(substackselectorlog)
<< "selecting substack from stack of size "
<< _stack->size() << std::endl;
LOG_ALL(substackselectorlog)
<< "first section is " << _firstImage
<< ", last section is " << _lastImage
<< std::endl;
if (_firstImage < 0) {
LOG_ALL(substackselectorlog)
<< "first section is negative, will set it to 0"
<< std::endl;
_firstImage = 0;
}
unsigned int lastImage = (_lastImage <= 0 ? _stack->size() - 1 + _lastImage : _lastImage);
LOG_ALL(substackselectorlog)
<< "set last section to " << lastImage
<< std::endl;
if (lastImage > _stack->size() - 1) {
LOG_ERROR(substackselectorlog)
<< "parameter last section (" << lastImage << ") "
<< "is bigger than number of images in given stack -- "
<< "will use " << (_stack->size() - 1) << " instead"
<< std::endl;
lastImage = _stack->size() - 1;
}
_subStack->clear();
for (unsigned int i = _firstImage; i <= lastImage; i++)
_subStack->add((*_stack)[i]);
// set the resolution of the substack
float resX = _stack->getResolutionX();
float resY = _stack->getResolutionY();
float resZ = _stack->getResolutionZ();
_subStack->setResolution(resX, resY, resZ);
_subStack->setOffset(
_stack->getBoundingBox().min().x(),
_stack->getBoundingBox().min().y(),
_stack->getBoundingBox().min().z() + _firstImage*resZ);
}
示例15: LOG_ALL
OpenGl::~OpenGl() {
LOG_ALL(opengllog) << "destructing..." << std::endl;
_globalContext->activate(false);
if (_globalContext)
delete _globalContext;
LOG_ALL(opengllog) << "destructed" << std::endl;
}