Skip to content

Create a template object in C++ based on the template of another object #2967

Discussion options

You must be logged in to vote

If recommand using simpleapi for that.

BaseObject::SPtr addBoxROI(BaseObject::SPtr target)
{   
       Node::SPtr node = dynamic_cast<Node*>(target->getContext());
       return createObject(node, "BoxROI", {{"template", target->getTemplateName()}} );
}

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hugtalbot
Comment options

hugtalbot
May 24, 2022
Maintainer Author

You must be logged in to vote
0 replies
Comment options

hugtalbot
Jun 3, 2022
Maintainer Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants