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

ENH: Added accessor functions to layout manager and factory #901

Closed
wants to merge 1 commit into from

Conversation

cpinter
Copy link
Member

@cpinter cpinter commented Feb 25, 2018

  • Layout manager factory can be accessed from python
  • View widgets can be retrieved by their layout label
  • 3D views can be retrieved by name

- Layout manager factory can be accessed from python
- View widgets can be retrieved by their layout label
- 3D views can be retrieved by name
@lassoan
Copy link
Contributor

lassoan commented Feb 25, 2018

LGTM!

qMRMLThreeDWidget* qMRMLLayoutManager::threeDWidget(const QString& name)const
{
return qobject_cast<qMRMLThreeDWidget*>(
this->mrmlViewFactory("vtkMRMLViewNode")->viewWidget(name));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check for null pointer

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I'll add that to the other similar functions too then.

@jcfr
Copy link
Member

jcfr commented Feb 25, 2018

👍

@cpinter
Copy link
Member Author

cpinter commented Feb 25, 2018

Thanks for the reviews! Integrated in Slicer/Slicer@7ffed00 with the required changes.

@cpinter cpinter closed this Feb 25, 2018
@cpinter cpinter deleted the layout-accessor-functions branch April 20, 2018 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants