vtkMRMLLabelMapVolumeNode?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

vtkMRMLLabelMapVolumeNode?

Yanling Liu

Hello,

Is there a vtkMRMLLabelMapVolumeNode class? There is vtkMRMLScalarVolumeNode class type for node selector but I didn't see a specific node type for label maps.

Thanks,
Yanling

_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vtkMRMLLabelMapVolumeNode?

finetjul
Hi Yanling,
LabelMaps are vtkMRMLScalarVolumeNode. There is no specialized class for it.
To know if a volume is a labelmap, you can do vtkMRMLScalarVolumeNode::GetLabelMap()).The labelmap-ness of a volume is controlled by the "LabelMap' node attribute (set by vtkMRMLScalarVolumeNode::LabelMapOn() or SetLabelMap(int))
You can specify a "LabelMap" attribute to filter the nodes in Qt node selector.

However, there is a special display node:

Hth,
Julien.

On Fri, May 4, 2012 at 1:14 PM, Yanling Liu <[hidden email]> wrote:

Hello,

Is there a vtkMRMLLabelMapVolumeNode class? There is vtkMRMLScalarVolumeNode class type for node selector but I didn't see a specific node type for label maps.

Thanks,
Yanling

_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: vtkMRMLLabelMapVolumeNode?

mosx
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hi,
I use the vtkMRMLLabelMapVolumeNode in my scripted plugin with python.
Can I convert the node in a numpy array?
 
Edit: I create a selection using this tutorial: youtube slicer selection. It create a volume and I select this volume with the "vtkMRMLScalarVolumeNode" component and in the logic of my plugin I obtain that the volume is a vtkMRMLLabelMapVolumeNode and now if I try to use vtk_to_numpy I have back this error:

"
File "/Users/marcomameli/Downloads/SlicerExtension/VolumeCalculation/VolumeCalculation/VolumeCalculation.py", line 123, in run
    numpy_data_array = numpy_support.vtk_to_numpy(workVolume)
  File "/Applications/Slicer.app/Contents/bin/Python/vtk/util/numpy_support.py", line 212, in vtk_to_numpy
    typ = vtk_array.GetDataType()
AttributeError: 'vtkCommonCorePython.vtkMRMLLabelMapVolumeNode' object has no attribute 'GetDataType'
"
Can anyone help me with this problem?