本文整理汇总了C++中LOG_ALL函数的典型用法代码示例。如果您正苦于以下问题:C++ LOG_ALL函数的具体用法?C++ LOG_ALL怎么用?C++ LOG_ALL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LOG_ALL函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
}
开发者ID:dlbrittain,项目名称:sopnet,代码行数:34,代码来源:NeuronsStackView.cpp
示例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();
}
}
开发者ID:aschampion,项目名称:python-sopnet,代码行数:34,代码来源:SegmentsStackView.cpp
示例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;
}
开发者ID:thanujadax,项目名称:sopnet,代码行数:29,代码来源:Reconstructor.cpp
示例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;
}
开发者ID:unidesigner,项目名称:imageprocessing,代码行数:35,代码来源:ImageStackView.cpp
示例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 {
开发者ID:dlbrittain,项目名称:sopnet,代码行数:33,代码来源:SegmentFeaturesExtractor.cpp
示例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);
}
开发者ID:aschampion,项目名称:python-sopnet,代码行数:29,代码来源:TolerantEditDistance.cpp
示例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);
}
}
}
开发者ID:funkey,项目名称:gui,代码行数:34,代码来源:SwitchImpl.cpp
示例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;
}
开发者ID:akreshuk,项目名称:sopnet,代码行数:32,代码来源:Reconstructor.cpp
示例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);
}
}
开发者ID:aschampion,项目名称:python-sopnet,代码行数:32,代码来源:SegmentExtractor.cpp
示例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;
}
开发者ID:juliabuhmann,项目名称:imageprocessing,代码行数:34,代码来源:ImageStackPainter.cpp
示例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();
}
开发者ID:funkey,项目名称:gui,代码行数:26,代码来源:ContainerPainter.cpp
示例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);
}
}
开发者ID:ongbe,项目名称:gui-1,代码行数:34,代码来源:OpenGl.cpp
示例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;
}
开发者ID:aschampion,项目名称:python-sopnet,代码行数:56,代码来源:TolerantEditDistance.cpp
示例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);
}
开发者ID:juliabuhmann,项目名称:imageprocessing,代码行数:56,代码来源:SubStackSelector.cpp
示例15: LOG_ALL
OpenGl::~OpenGl() {
LOG_ALL(opengllog) << "destructing..." << std::endl;
_globalContext->activate(false);
if (_globalContext)
delete _globalContext;
LOG_ALL(opengllog) << "destructed" << std::endl;
}
开发者ID:ongbe,项目名称:gui-1,代码行数:10,代码来源:OpenGl.cpp
示例16: LOG_ALL
void
SegmentsPainter::drawSlice(
boost::shared_ptr<Slice> slice,
double red, double green, double blue) {
double section = slice->getSection();
LOG_ALL(segmentspainterlog)
<< "drawing slice " << slice->getId()
<< " in section " << section << std::endl;
double z = _zScale*section;
glCheck(glColor4f(red, green, blue, 1.0));
_textures.get(slice->getId())->bind();
glBegin(GL_QUADS);
const util::rect<double>& bb = slice->getComponent()->getBoundingBox();
if (_leftSide) {
glTexCoord2d(1.0, 0.0); glNormal3d(0, 0, -1); glVertex3d(bb.maxX, bb.minY, z);
glTexCoord2d(1.0, 1.0); glNormal3d(0, 0, -1); glVertex3d(bb.maxX, bb.maxY, z);
glTexCoord2d(0.0, 1.0); glNormal3d(0, 0, -1); glVertex3d(bb.minX, bb.maxY, z);
glTexCoord2d(0.0, 0.0); glNormal3d(0, 0, -1); glVertex3d(bb.minX, bb.minY, z);
}
if (_rightSide) {
glTexCoord2d(0.0, 0.0); glNormal3d(0, 0, 1); glVertex3d(bb.minX, bb.minY, z);
glTexCoord2d(0.0, 1.0); glNormal3d(0, 0, 1); glVertex3d(bb.minX, bb.maxY, z);
glTexCoord2d(1.0, 1.0); glNormal3d(0, 0, 1); glVertex3d(bb.maxX, bb.maxY, z);
glTexCoord2d(1.0, 0.0); glNormal3d(0, 0, 1); glVertex3d(bb.maxX, bb.minY, z);
}
glCheck(glEnd());
LOG_ALL(segmentspainterlog) << "done." << std::endl;
if (_size == util::rect<double>(0, 0, 0, 0))
_size = bb;
else {
_size.minX = std::min(_size.minX, bb.minX);
_size.minY = std::min(_size.minY, bb.minY);
_size.maxX = std::max(_size.maxX, bb.maxX);
_size.maxY = std::max(_size.maxY, bb.maxY);
}
}
开发者ID:ottj,项目名称:sopnet,代码行数:53,代码来源:SegmentsPainter.cpp
示例17: LOG_ALL
std::set<Crag::CragNode>
AdjacencyAnnotator::recurseAdjacencies(Crag& crag, Crag::CragNode n) {
LOG_ALL(adjacencyannotatorlog) << "recursing into node " << crag.id(n) << std::endl;
// get all leaf subnodes
std::set<Crag::CragNode> subnodes;
for (Crag::CragArc a : crag.inArcs(n)) {
std::set<Crag::CragNode> a_subnodes = recurseAdjacencies(crag, a.source());
for (Crag::CragNode s : a_subnodes)
subnodes.insert(s);
}
// for each leaf subnode adjacent to a non-subnode, add an adjacency edge to
// the non-subnode
std::set<Crag::CragNode> neighbors;
LOG_ALL(adjacencyannotatorlog) << "subnodes of " << crag.id(n) << " are:" << std::endl;
for (Crag::CragNode s : subnodes) {
LOG_ALL(adjacencyannotatorlog) << "\t" << crag.id(s) << std::endl;
for (Crag::CragEdge e : crag.adjEdges(s)) {
Crag::CragNode neighbor = e.opposite(s);
// not a subnode
if (!subnodes.count(neighbor))
neighbors.insert(neighbor);
}
}
for (Crag::CragNode neighbor : neighbors) {
LOG_ALL(adjacencyannotatorlog)
<< "adding propagated edge between "
<< crag.id(n) << " and " << crag.id(neighbor)
<< std::endl;
crag.addAdjacencyEdge(n, neighbor);
}
_numAdded += neighbors.size();
subnodes.insert(n);
LOG_ALL(adjacencyannotatorlog) << "leaving node " << crag.id(n) << std::endl;
return subnodes;
}
开发者ID:DaniUPC,项目名称:candidate_mc,代码行数:52,代码来源:AdjacencyAnnotator.cpp
示例18: LOG_ALL
void
GroundTruthExtractor::SegmentsAssembler::updateOutputs() {
LOG_ALL(groundtruthextractorlog)
<< "assembling segments from "
<< _segments.size() << " inter-section intervals"
<< std::endl;
_allSegments->clear();
foreach (boost::shared_ptr<Segments> segments, _segments) {
LOG_ALL(groundtruthextractorlog) << "adding " << segments->size() << " segments" << std::endl;
_allSegments->addAll(segments);
}
开发者ID:dlbrittain,项目名称:sopnet,代码行数:16,代码来源:GroundTruthExtractor.cpp
示例19: LOG_ALL
bool
ImageStackPainter::draw(
const util::rect<double>& roi,
const util::point<double>& resolution) {
LOG_ALL(imagestackpainterlog) << "redrawing section " << _section << std::endl;
if (_showColored) {
for (int i = 0; i < _stack->size(); i++) {
_imagePainters[i]->draw(roi, resolution);
}
} else {
for (int i = 0; i < _numImages; i++) {
int offset = i - _numImages/2;
glTranslated(0, -offset*_imageHeight, 0);
_imagePainters[i]->draw(roi - util::point<double>(static_cast<double>(0), -offset*_imageHeight), resolution);
glTranslated(0, offset*_imageHeight, 0);
}
}
return false;
}
开发者ID:hksonngan,项目名称:imageprocessing,代码行数:30,代码来源:ImageStackPainter.cpp
示例20: LOG_ALL
void
ImageStackView::onButtonDown(gui::MouseDown& signal) {
LOG_ALL(imagestackviewlog) << "got a mouse down event" << std::endl;
if (signal.button == gui::buttons::Left && signal.modifiers == 0) {
_mouseDownX = signal.position.x;
_mouseDownY = signal.position.y;
LOG_ALL(imagestackviewlog) << "setting click position to (" << _mouseDownX << ", " << _mouseDownY << ")" << std::endl;
setDirty(_clickX);
setDirty(_clickY);
}
}
开发者ID:hksonngan,项目名称:imageprocessing,代码行数:16,代码来源:ImageStackView.cpp
注:本文中的LOG_ALL函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论