Excuse my silly question if it is silly or it has been addressed somewhere else (please forward a link to me then, Thanks.). Anyway I have been confused a lot by this–>
In the class vtkMRMLScen, the following methods:
GetNodes()
GetNodesByClass(…)
GetNodesByClassByName(…, …)
GetNodesByName(…)
return “vtkCollection”, while the following methods:
GetNodeByID(…)
GetNthNode(…)
GetNthNodeByClass(…, …)
retrun “vtkMRMLNode”.
So would you please get me any explanation ? is there a way to get converted to each other? Thanks a lot in advance.
Best,
Aiden
A vtkMRMLNode is a subclass of vtkObject, and so can be stored in a vtkCollection. You can access the members of a collection through a variety of functions (by index, iterating, etc). Example in C++ of accessing an object at index i as a vtkMRMLNode:
Thanks a lot.
I was confused/puzzled by these similar methods/functions which have almost same-type names but return different types. I was always lost while I tried to use one or another such method function.