3D Slicer View Window Python Names

What would the python node names be for the red, yellow, and green views?
I am getting a error in which the:

markupsNode =slicer.mrmlScene.GetFirstNodeByName("CTChest") 

command does not grab the individual views causing this error:

Traceback (most recent call last):
File “”, line 1, in
AttributeError: ‘vtkCommonCorePython.vtkMRMLScalarVolumeNode’ object has no attribute
’GetNthFiducialPosition’

So it would seem like the node name would be the issue, is that the case?

In the code and error you pasted you are getting the vtkMRMLScalarVolumeNode, but if you want to get the vtkMRMLMarkupsFiducialNode (default name “F”) and get the point you get call:

markupsNode = slicer.mrmlScene.GetFirstNodeByName("F")
p = [0,]*3
markupsNode.GetNthFiducialPosition(0, p)

Not sure what you mean by trying to get with the view names - did need fiducial positions or something about the views?

Hi,
What I am trying to do is to control the brightness, zooming in/out, and rotation via the python interactor or window in the 3d slicer. I have been trying so hard to figure out the code that would enable me to manipulate these three characteristics, but I have been not able to understand the logic of 3dslicer code. Would you please provide me with the proper code that would allow me to edit/manipulate the brightness, zooming in/out, and rotation via the python interactor ?

Thank you

Hi Ahmed -

Probably you need to start by getting comfortable with doing python programming in Slicer. This tutorial goes through the whole process and even if it has some steps that aren’t exactly what you need it will give you the background you need to understand the documentation and examples:

https://www.slicer.org/wiki/Documentation/4.8/Training#Developing_and_contributing_extensions_for_3D_Slicer

As I mentioned in response to your previous question, you can control the views by accessing the various associated nodes. Did you try the SetFieldOfView example I sent?

A post was split to a new topic: Select cells of a 3D model