Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve documentation of Copy behavior on MRML nodes #3617

Closed
slicerbot opened this issue Mar 13, 2020 · 2 comments
Closed

improve documentation of Copy behavior on MRML nodes #3617

slicerbot opened this issue Mar 13, 2020 · 2 comments
Assignees
Labels
Priority: Low Small, non-essential improvements or fixes Type: Enhancement Improvement to functionality
Milestone

Comments

@slicerbot
Copy link
Collaborator

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.

@lassoan lassoan self-assigned this Mar 20, 2020
@lassoan lassoan added Priority: Low Small, non-essential improvements or fixes Type: Enhancement Improvement to functionality labels Mar 20, 2020
@lassoan lassoan added this to the Slicer 4.11.0 milestone Mar 20, 2020
@lassoan
Copy link
Contributor

lassoan commented Mar 20, 2020

Node copy behavior should be improved - allow explicit deep and shallow copy, and reconsider copying name, scene, and node references, etc.

@jcfr
Copy link
Member

jcfr commented Apr 17, 2020

Closing. Fixed in #4830

Documentation now available here:

/// \brief Copy node contents from another node of the same type.
/// Does not copy node ID, Scene, Name, SingletonTag, HideFromEditors, AddToScene, UndoEnabled,
/// and node references.
/// If deepCopy is set to false then a shallow copy of bulk data (such as image or mesh data) could be made;
/// copying may be faster but the node may share some data with the source node instead of creating
/// an independent copy.
/// \note
/// If a class implements this then make sure CopyContent and HasCopyContent methods are implemented
/// in all parent classes by adding vtkMRMLCopyContentMacro(ClassName) to the class headers.
virtual void CopyContent(vtkMRMLNode* node, bool deepCopy=true);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Small, non-essential improvements or fixes Type: Enhancement Improvement to functionality
Development

No branches or pull requests

3 participants