I am following the tutorials on “Programming in Slicer4” implementing the demo “Implemen:ng the
Laplace* Operator”. Everything is fine. The problems come out when I tried to modify the program using C++. Currently I have difficulties in converting the following lines into C++. I can’t find the corresponding class and method in C++.
# make the output volume appear in all the slice views
slicer.util.setSliceViewerLayers(background=self.outputSelector.currentNode())
Hi - In general it can help to use the git grep command in the source directory to search for the definition and uses of methods. Or you can search the repository at the github page.
I have solve this problem and have my C++ version of this “Implementing the Laplace* Operator” demo.
You have introduced a good way of using “git grep”. That’s nice. Before your recommendation, I have tried to use grep in Ubuntu and “findstr” in Windows. I failed to get the correct answer because I searched in a wrong directory. I thought the function “setSliceViewerLayers” was a member function of some MRML classes.
Thank you. And I think it would be better to have the c++ version of this tutorial later on.