本文整理汇总了C++中LayerPtr::transform方法的典型用法代码示例。如果您正苦于以下问题:C++ LayerPtr::transform方法的具体用法?C++ LayerPtr::transform怎么用?C++ LayerPtr::transform使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayerPtr
的用法示例。
在下文中一共展示了LayerPtr::transform方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: stack
/**
* \brief Add an image
*
* Adding an image to the stack means that we have to find the transform
* is needed to make the image congruent to the base image
*/
void Stack::add(ImagePtr image) {
debug(LOG_DEBUG, DEBUG_LOG, 0,
"adding %s-sized image to stack (already %d images)",
image->size().toString().c_str(), size());
// create a new layer
LayerPtr newlayer = LayerPtr(new Layer(image));
// get adapters for the two images to compare
StackingAdapter *baseadapter = StackingAdapter::get(_base);
StackingAdapterPtr baseadapterptr(baseadapter);
StackingAdapter *imageadapter = StackingAdapter::get(image);
StackingAdapterPtr imageadapterptr(imageadapter);
// use a transform analyzer to find the transform, add the transform
// to the layer
transform::TransformAnalyzer ta(*baseadapter, 2048, 2048);
newlayer->transform(ta(*imageadapter));
// add the layer to the stack
debug(LOG_DEBUG, DEBUG_LOG, 0, "adding layer %d: %s", size(),
newlayer->toString().c_str());
push_back(newlayer);
}