use volume rendering in my module

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

use volume rendering in my module

tarun14110
How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.

--
Regards,
Tarun kumar yadav
B.Tech 3rd year (CSE)
Roll no. 2014110

_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: use volume rendering in my module

lasso2

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110


_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: use volume rendering in my module

tarun14110
In reply to this post by tarun14110
Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--
Regards,
Tarun kumar yadav
B.Tech 3rd year (CSE)
Roll no. 2014110

_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: use volume rendering in my module

lasso2
In reply to this post by tarun14110

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110


_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: use volume rendering in my module

tarun14110
In reply to this post by tarun14110
I am getting `volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())
AttributeError: 'NoneType' object has no attribute 'AddAndObserveDisplayNodeID'` error now. What may be the issue ?

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--
Regards,
Tarun kumar yadav
B.Tech 3rd year (CSE)
Roll no. 2014110

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--
Regards,
Tarun kumar yadav
B.Tech 3rd year (CSE)
Roll no. 2014110

_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: use volume rendering in my module

pinter

volumeNode variable contains nothing. You can get the volume node by calling

slicer.util.getNode(‘YourNodeName’)

or

slicer.mrmlScene.GetNodeByID(…)

etc, depending on your way of accessing your volume node.

 

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: Wednesday, February 15, 2017 14:24
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

I am getting `volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())
AttributeError: 'NoneType' object has no attribute 'AddAndObserveDisplayNodeID'` error now. What may be the issue ?

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110


_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: use volume rendering in my module

Tamas Ungi-2

The MRHead example should be in volumeNode by the time that line is called.

When you run just this much of the code:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

do you see a head MRI image in the Slicer viewers?

 

 

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: February 15, 2017 2:27 PM
To: Tarun Kumar Yadav <[hidden email]>; Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

volumeNode variable contains nothing. You can get the volume node by calling

slicer.util.getNode(‘YourNodeName’)

or

slicer.mrmlScene.GetNodeByID(…)

etc, depending on your way of accessing your volume node.

 

 

From: slicer-devel [[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: Wednesday, February 15, 2017 14:24
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

I am getting `volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())
AttributeError: 'NoneType' object has no attribute 'AddAndObserveDisplayNodeID'` error now. What may be the issue ?

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110


_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: use volume rendering in my module

tarun14110
In reply to this post by pinter
There is issue while downloading MRhead example.

`<b>File already exists in cache - reusing it.</b>
<b>Requesting load</b> <i>MRHead</i> from /tmp/Slicer/RemoteIO/MR-head.nrrd...

ReadData: This is not a nrrd file


ReadData: Cannot read file as a volume of type DiffusionTensorVolume[fullName = /tmp/Slicer/RemoteIO/MR-head.nrrd]
    Number of files listed in the node = 0.
    File reader says it was able to read 0 files.
    File reader used the archetype file name of /tmp/Slicer/RemoteIO/MR-head.nrrd []
ITK exception info: error in unknown
 Could not create IO object for reading file /tmp/Slicer/RemoteIO/MR-head.nrrd
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    MGHImageIO
    MRMLIDImageIO
    HDF5ImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.




ReadData: This is not a nrrd file


ReadData: Failed to instantiate a file reader


ReadData: Cannot read file as a volume of type Volume[fullName = /tmp/Slicer/RemoteIO/MR-head.nrrd]
    Number of files listed in the node = 0.
    File reader says it was able to read 0 files.
    File reader used the archetype file name of /tmp/Slicer/RemoteIO/MR-head.nrrd []
ITK exception info: error in unknown
 Could not create IO object for reading file /tmp/Slicer/RemoteIO/MR-head.nrrd
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    MGHImageIO
    MRMLIDImageIO
    HDF5ImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.
`

On Thu, Feb 16, 2017 at 1:06 AM, Tamas Ungi <[hidden email]> wrote:

The MRHead example should be in volumeNode by the time that line is called.

When you run just this much of the code:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

do you see a head MRI image in the Slicer viewers?

 

 

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: February 15, 2017 2:27 PM
To: Tarun Kumar Yadav <[hidden email]>; Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

volumeNode variable contains nothing. You can get the volume node by calling

slicer.util.getNode(‘YourNodeName’)

or

slicer.mrmlScene.GetNodeByID(…)

etc, depending on your way of accessing your volume node.

 

 

From: slicer-devel [[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: Wednesday, February 15, 2017 14:24
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

I am getting `volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())
AttributeError: 'NoneType' object has no attribute 'AddAndObserveDisplayNodeID'` error now. What may be the issue ?

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--
Regards,
Tarun kumar yadav
B.Tech 3rd year (CSE)
Roll no. 2014110

_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: use volume rendering in my module

pinter
In reply to this post by pinter

Probably the file didn’t finish downloading for some reason.

Delete /tmp/Slicer/RemoteIO/MR-head.nrrd, then start Slicer and try loading it again.

 

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: Wednesday, February 15, 2017 15:00
To: Tamas Ungi <[hidden email]>
Cc: Csaba Pinter <[hidden email]>; Andras Lasso <[hidden email]>; SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

There is issue while downloading MRhead example.

`<b>File already exists in cache - reusing it.</b>
<b>Requesting load</b> <i>MRHead</i> from /tmp/Slicer/RemoteIO/MR-head.nrrd...

ReadData: This is not a nrrd file


ReadData: Cannot read file as a volume of type DiffusionTensorVolume[fullName = /tmp/Slicer/RemoteIO/MR-head.nrrd]
    Number of files listed in the node = 0.
    File reader says it was able to read 0 files.
    File reader used the archetype file name of /tmp/Slicer/RemoteIO/MR-head.nrrd []
ITK exception info: error in unknown
 Could not create IO object for reading file /tmp/Slicer/RemoteIO/MR-head.nrrd
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    MGHImageIO
    MRMLIDImageIO
    HDF5ImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.




ReadData: This is not a nrrd file


ReadData: Failed to instantiate a file reader


ReadData: Cannot read file as a volume of type Volume[fullName = /tmp/Slicer/RemoteIO/MR-head.nrrd]
    Number of files listed in the node = 0.
    File reader says it was able to read 0 files.
    File reader used the archetype file name of /tmp/Slicer/RemoteIO/MR-head.nrrd []
ITK exception info: error in unknown
 Could not create IO object for reading file /tmp/Slicer/RemoteIO/MR-head.nrrd
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    MGHImageIO
    MRMLIDImageIO
    HDF5ImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.
`

 

On Thu, Feb 16, 2017 at 1:06 AM, Tamas Ungi <[hidden email]> wrote:

The MRHead example should be in volumeNode by the time that line is called.

When you run just this much of the code:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

do you see a head MRI image in the Slicer viewers?

 

 

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: February 15, 2017 2:27 PM
To: Tarun Kumar Yadav <[hidden email]>; Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

volumeNode variable contains nothing. You can get the volume node by calling

slicer.util.getNode(‘YourNodeName’)

or

slicer.mrmlScene.GetNodeByID(…)

etc, depending on your way of accessing your volume node.

 

 

From: slicer-devel [[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: Wednesday, February 15, 2017 14:24
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

I am getting `volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())
AttributeError: 'NoneType' object has no attribute 'AddAndObserveDisplayNodeID'` error now. What may be the issue ?

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.


_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: use volume rendering in my module

tarun14110
In reply to this post by pinter
It is working fine now. Thanks a lot :-)

On Thu, Feb 16, 2017 at 1:36 AM, Csaba Pinter <[hidden email]> wrote:

Probably the file didn’t finish downloading for some reason.

Delete /tmp/Slicer/RemoteIO/MR-head.nrrd, then start Slicer and try loading it again.

 

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: Wednesday, February 15, 2017 15:00
To: Tamas Ungi <[hidden email]>
Cc: Csaba Pinter <[hidden email]>; Andras Lasso <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: use volume rendering in my module

 

There is issue while downloading MRhead example.

`<b>File already exists in cache - reusing it.</b>
<b>Requesting load</b> <i>MRHead</i> from /tmp/Slicer/RemoteIO/MR-head.nrrd...

ReadData: This is not a nrrd file


ReadData: Cannot read file as a volume of type DiffusionTensorVolume[fullName = /tmp/Slicer/RemoteIO/MR-head.nrrd]
    Number of files listed in the node = 0.
    File reader says it was able to read 0 files.
    File reader used the archetype file name of /tmp/Slicer/RemoteIO/MR-head.nrrd []
ITK exception info: error in unknown
 Could not create IO object for reading file /tmp/Slicer/RemoteIO/MR-head.nrrd
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    MGHImageIO
    MRMLIDImageIO
    HDF5ImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.




ReadData: This is not a nrrd file


ReadData: Failed to instantiate a file reader


ReadData: Cannot read file as a volume of type Volume[fullName = /tmp/Slicer/RemoteIO/MR-head.nrrd]
    Number of files listed in the node = 0.
    File reader says it was able to read 0 files.
    File reader used the archetype file name of /tmp/Slicer/RemoteIO/MR-head.nrrd []
ITK exception info: error in unknown
 Could not create IO object for reading file /tmp/Slicer/RemoteIO/MR-head.nrrd
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    MGHImageIO
    MRMLIDImageIO
    HDF5ImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.
`

 

On Thu, Feb 16, 2017 at 1:06 AM, Tamas Ungi <[hidden email]> wrote:

The MRHead example should be in volumeNode by the time that line is called.

When you run just this much of the code:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

do you see a head MRI image in the Slicer viewers?

 

 

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: February 15, 2017 2:27 PM
To: Tarun Kumar Yadav <[hidden email]>; Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

volumeNode variable contains nothing. You can get the volume node by calling

slicer.util.getNode(‘YourNodeName’)

or

slicer.mrmlScene.GetNodeByID(…)

etc, depending on your way of accessing your volume node.

 

 

From: slicer-devel [[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: Wednesday, February 15, 2017 14:24
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

I am getting `volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())
AttributeError: 'NoneType' object has no attribute 'AddAndObserveDisplayNodeID'` error now. What may be the issue ?

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--
Regards,
Tarun kumar yadav
B.Tech 3rd year (CSE)
Roll no. 2014110

_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: use volume rendering in my module

tarun14110
The volume rendering is working fine. Now, I am trying to segment the volume using editor module features and then render the segmented volume. But I am not able to find, how can I get the different label segmented volume nodes ?

On Thu, Feb 16, 2017 at 1:46 AM, Tarun Kumar Yadav <[hidden email]> wrote:
It is working fine now. Thanks a lot :-)

On Thu, Feb 16, 2017 at 1:36 AM, Csaba Pinter <[hidden email]> wrote:

Probably the file didn’t finish downloading for some reason.

Delete /tmp/Slicer/RemoteIO/MR-head.nrrd, then start Slicer and try loading it again.

 

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: Wednesday, February 15, 2017 15:00
To: Tamas Ungi <[hidden email]>
Cc: Csaba Pinter <[hidden email]>; Andras Lasso <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: use volume rendering in my module

 

There is issue while downloading MRhead example.

`<b>File already exists in cache - reusing it.</b>
<b>Requesting load</b> <i>MRHead</i> from /tmp/Slicer/RemoteIO/MR-head.nrrd...

ReadData: This is not a nrrd file


ReadData: Cannot read file as a volume of type DiffusionTensorVolume[fullName = /tmp/Slicer/RemoteIO/MR-head.nrrd]
    Number of files listed in the node = 0.
    File reader says it was able to read 0 files.
    File reader used the archetype file name of /tmp/Slicer/RemoteIO/MR-head.nrrd []
ITK exception info: error in unknown
 Could not create IO object for reading file /tmp/Slicer/RemoteIO/MR-head.nrrd
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    MGHImageIO
    MRMLIDImageIO
    HDF5ImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.




ReadData: This is not a nrrd file


ReadData: Failed to instantiate a file reader


ReadData: Cannot read file as a volume of type Volume[fullName = /tmp/Slicer/RemoteIO/MR-head.nrrd]
    Number of files listed in the node = 0.
    File reader says it was able to read 0 files.
    File reader used the archetype file name of /tmp/Slicer/RemoteIO/MR-head.nrrd []
ITK exception info: error in unknown
 Could not create IO object for reading file /tmp/Slicer/RemoteIO/MR-head.nrrd
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    MGHImageIO
    MRMLIDImageIO
    HDF5ImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.
`

 

On Thu, Feb 16, 2017 at 1:06 AM, Tamas Ungi <[hidden email]> wrote:

The MRHead example should be in volumeNode by the time that line is called.

When you run just this much of the code:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

do you see a head MRI image in the Slicer viewers?

 

 

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: February 15, 2017 2:27 PM
To: Tarun Kumar Yadav <[hidden email]>; Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

volumeNode variable contains nothing. You can get the volume node by calling

slicer.util.getNode(‘YourNodeName’)

or

slicer.mrmlScene.GetNodeByID(…)

etc, depending on your way of accessing your volume node.

 

 

From: slicer-devel [[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: Wednesday, February 15, 2017 14:24
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

I am getting `volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())
AttributeError: 'NoneType' object has no attribute 'AddAndObserveDisplayNodeID'` error now. What may be the issue ?

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
Image removed by sender.




--
Regards,
Tarun kumar yadav
B.Tech 3rd year (CSE)
Roll no. 2014110

_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ



--
Regards,
Tarun kumar yadav
B.Tech 3rd year (CSE)
Roll no. 2014110

_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: use volume rendering in my module

lasso2

No need for volume rendering for showing a segmented volume. Just create closed surface representation in your segmentation node:

 

segmentationNode = getNode('Segmentation')

import vtkSegmentationCorePython as vtkSegmentationCore

segmentationNode.GetSegmentation().CreateRepresentation(vtkSegmentationCore.vtkSegmentationConverter.GetSegmentationClosedSurfaceRepresentationName())

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 16, 2017 3:49
To: Csaba Pinter <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

The volume rendering is working fine. Now, I am trying to segment the volume using editor module features and then render the segmented volume. But I am not able to find, how can I get the different label segmented volume nodes ?

 

On Thu, Feb 16, 2017 at 1:46 AM, Tarun Kumar Yadav <[hidden email]> wrote:

It is working fine now. Thanks a lot :-)

 

On Thu, Feb 16, 2017 at 1:36 AM, Csaba Pinter <[hidden email]> wrote:

Probably the file didn’t finish downloading for some reason.

Delete /tmp/Slicer/RemoteIO/MR-head.nrrd, then start Slicer and try loading it again.

 

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: Wednesday, February 15, 2017 15:00
To: Tamas Ungi <
[hidden email]>
Cc: Csaba Pinter <
[hidden email]>; Andras Lasso <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: use volume rendering in my module

 

There is issue while downloading MRhead example.

`<b>File already exists in cache - reusing it.</b>
<b>Requesting load</b> <i>MRHead</i> from /tmp/Slicer/RemoteIO/MR-head.nrrd...

ReadData: This is not a nrrd file


ReadData: Cannot read file as a volume of type DiffusionTensorVolume[fullName = /tmp/Slicer/RemoteIO/MR-head.nrrd]
    Number of files listed in the node = 0.
    File reader says it was able to read 0 files.
    File reader used the archetype file name of /tmp/Slicer/RemoteIO/MR-head.nrrd []
ITK exception info: error in unknown
 Could not create IO object for reading file /tmp/Slicer/RemoteIO/MR-head.nrrd
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    MGHImageIO
    MRMLIDImageIO
    HDF5ImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.




ReadData: This is not a nrrd file


ReadData: Failed to instantiate a file reader


ReadData: Cannot read file as a volume of type Volume[fullName = /tmp/Slicer/RemoteIO/MR-head.nrrd]
    Number of files listed in the node = 0.
    File reader says it was able to read 0 files.
    File reader used the archetype file name of /tmp/Slicer/RemoteIO/MR-head.nrrd []
ITK exception info: error in unknown
 Could not create IO object for reading file /tmp/Slicer/RemoteIO/MR-head.nrrd
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    MGHImageIO
    MRMLIDImageIO
    HDF5ImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.
`

 

On Thu, Feb 16, 2017 at 1:06 AM, Tamas Ungi <[hidden email]> wrote:

The MRHead example should be in volumeNode by the time that line is called.

When you run just this much of the code:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

do you see a head MRI image in the Slicer viewers?

 

 

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: February 15, 2017 2:27 PM
To: Tarun Kumar Yadav <
[hidden email]>; Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <
[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

volumeNode variable contains nothing. You can get the volume node by calling

slicer.util.getNode(‘YourNodeName’)

or

slicer.mrmlScene.GetNodeByID(…)

etc, depending on your way of accessing your volume node.

 

 

From: slicer-devel [[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: Wednesday, February 15, 2017 14:24
To: Andras Lasso <
[hidden email]>
Cc: SPL Slicer Devel <
[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

I am getting `volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())
AttributeError: 'NoneType' object has no attribute 'AddAndObserveDisplayNodeID'` error now. What may be the issue ?

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <
[hidden email]>
Cc: SPL Slicer Devel <
[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <
[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <
[hidden email]>
Cc: SPL Slicer Devel <
[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <
[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110


_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
http://www.iiitd.ac.in/sites/default/files/images/site/iiitd-logo.jpg


_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: use volume rendering in my module

tarun14110
In reply to this post by tarun14110
Thanks Andras, I am able to see 3d segmented volume. I have some more issues-

1) How can I display a specific segmented label volume in 3d view ?
2) Can I display multiple segmented labels in 3d view such that outer volume is transparent enough to view the inner volume?
3) Can you please point me to some documentation or example modules for such relevant tasks?

On Fri, Feb 17, 2017 at 12:24 AM, Andras Lasso <[hidden email]> wrote:

No need for volume rendering for showing a segmented volume. Just create closed surface representation in your segmentation node:

 

segmentationNode = getNode('Segmentation')

import vtkSegmentationCorePython as vtkSegmentationCore

segmentationNode.GetSegmentation().CreateRepresentation(vtkSegmentationCore.vtkSegmentationConverter.GetSegmentationClosedSurfaceRepresentationName())

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 16, 2017 3:49
To: Csaba Pinter <[hidden email]>


Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

The volume rendering is working fine. Now, I am trying to segment the volume using editor module features and then render the segmented volume. But I am not able to find, how can I get the different label segmented volume nodes ?

 

On Thu, Feb 16, 2017 at 1:46 AM, Tarun Kumar Yadav <[hidden email]> wrote:

It is working fine now. Thanks a lot :-)

 

On Thu, Feb 16, 2017 at 1:36 AM, Csaba Pinter <[hidden email]> wrote:

Probably the file didn’t finish downloading for some reason.

Delete /tmp/Slicer/RemoteIO/MR-head.nrrd, then start Slicer and try loading it again.

 

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: Wednesday, February 15, 2017 15:00
To: Tamas Ungi <
[hidden email]>
Cc: Csaba Pinter <
[hidden email]>; Andras Lasso <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: use volume rendering in my module

 

There is issue while downloading MRhead example.

`<b>File already exists in cache - reusing it.</b>
<b>Requesting load</b> <i>MRHead</i> from /tmp/Slicer/RemoteIO/MR-head.nrrd...

ReadData: This is not a nrrd file


ReadData: Cannot read file as a volume of type DiffusionTensorVolume[fullName = /tmp/Slicer/RemoteIO/MR-head.nrrd]
    Number of files listed in the node = 0.
    File reader says it was able to read 0 files.
    File reader used the archetype file name of /tmp/Slicer/RemoteIO/MR-head.nrrd []
ITK exception info: error in unknown
 Could not create IO object for reading file /tmp/Slicer/RemoteIO/MR-head.nrrd
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    MGHImageIO
    MRMLIDImageIO
    HDF5ImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.




ReadData: This is not a nrrd file


ReadData: Failed to instantiate a file reader


ReadData: Cannot read file as a volume of type Volume[fullName = /tmp/Slicer/RemoteIO/MR-head.nrrd]
    Number of files listed in the node = 0.
    File reader says it was able to read 0 files.
    File reader used the archetype file name of /tmp/Slicer/RemoteIO/MR-head.nrrd []
ITK exception info: error in unknown
 Could not create IO object for reading file /tmp/Slicer/RemoteIO/MR-head.nrrd
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    MGHImageIO
    MRMLIDImageIO
    HDF5ImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.
`

 

On Thu, Feb 16, 2017 at 1:06 AM, Tamas Ungi <[hidden email]> wrote:

The MRHead example should be in volumeNode by the time that line is called.

When you run just this much of the code:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

do you see a head MRI image in the Slicer viewers?

 

 

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: February 15, 2017 2:27 PM
To: Tarun Kumar Yadav <
[hidden email]>; Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <
[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

volumeNode variable contains nothing. You can get the volume node by calling

slicer.util.getNode(‘YourNodeName’)

or

slicer.mrmlScene.GetNodeByID(…)

etc, depending on your way of accessing your volume node.

 

 

From: slicer-devel [[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: Wednesday, February 15, 2017 14:24
To: Andras Lasso <
[hidden email]>
Cc: SPL Slicer Devel <
[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

I am getting `volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())
AttributeError: 'NoneType' object has no attribute 'AddAndObserveDisplayNodeID'` error now. What may be the issue ?

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <
[hidden email]>
Cc: SPL Slicer Devel <
[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <
[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <
[hidden email]>
Cc: SPL Slicer Devel <
[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <
[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110


_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
http://www.iiitd.ac.in/sites/default/files/images/site/iiitd-logo.jpg




--
Regards,
Tarun kumar yadav
B.Tech 3rd year (CSE)
Roll no. 2014110

_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: use volume rendering in my module

lasso2
In reply to this post by tarun14110

segmentationNode = getNode('Segmentation')

displayNode = segmentationNode.GetDisplayNode()

displayNode.SetAllSegmentsVisibility3D(False)

segmentID = segmentationNode.GetSegmentation().GetNthSegmentID(0)

displayNode.SetSegmentVisibility3D(segmentID, True)

displayNode.SetSegmentOpacity3D(segmentID, 0.2)

 

More examples:

https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_run_segment_editor_effects_from_a_script

https://github.com/Slicer/Slicer/blob/master/Modules/Loadable/Segmentations/Testing/Python/SegmentationsModuleTest1.py

 

Documentation:

https://www.slicer.org/doc/html/classvtkMRMLSegmentationDisplayNode.html

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 16, 2017 15:10
To: Andras Lasso <[hidden email]>
Cc: Csaba Pinter <[hidden email]>; SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

Thanks Andras, I am able to see 3d segmented volume. I have some more issues-

1) How can I display a specific segmented label volume in 3d view ?

2) Can I display multiple segmented labels in 3d view such that outer volume is transparent enough to view the inner volume?

3) Can you please point me to some documentation or example modules for such relevant tasks?

 

On Fri, Feb 17, 2017 at 12:24 AM, Andras Lasso <[hidden email]> wrote:

No need for volume rendering for showing a segmented volume. Just create closed surface representation in your segmentation node:

 

segmentationNode = getNode('Segmentation')

import vtkSegmentationCorePython as vtkSegmentationCore

segmentationNode.GetSegmentation().CreateRepresentation(vtkSegmentationCore.vtkSegmentationConverter.GetSegmentationClosedSurfaceRepresentationName())

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 16, 2017 3:49
To: Csaba Pinter <[hidden email]>


Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

The volume rendering is working fine. Now, I am trying to segment the volume using editor module features and then render the segmented volume. But I am not able to find, how can I get the different label segmented volume nodes ?

 

On Thu, Feb 16, 2017 at 1:46 AM, Tarun Kumar Yadav <[hidden email]> wrote:

It is working fine now. Thanks a lot :-)

 

On Thu, Feb 16, 2017 at 1:36 AM, Csaba Pinter <[hidden email]> wrote:

Probably the file didn’t finish downloading for some reason.

Delete /tmp/Slicer/RemoteIO/MR-head.nrrd, then start Slicer and try loading it again.

 

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: Wednesday, February 15, 2017 15:00
To: Tamas Ungi <
[hidden email]>
Cc: Csaba Pinter <
[hidden email]>; Andras Lasso <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: use volume rendering in my module

 

There is issue while downloading MRhead example.

`<b>File already exists in cache - reusing it.</b>
<b>Requesting load</b> <i>MRHead</i> from /tmp/Slicer/RemoteIO/MR-head.nrrd...

ReadData: This is not a nrrd file


ReadData: Cannot read file as a volume of type DiffusionTensorVolume[fullName = /tmp/Slicer/RemoteIO/MR-head.nrrd]
    Number of files listed in the node = 0.
    File reader says it was able to read 0 files.
    File reader used the archetype file name of /tmp/Slicer/RemoteIO/MR-head.nrrd []
ITK exception info: error in unknown
 Could not create IO object for reading file /tmp/Slicer/RemoteIO/MR-head.nrrd
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    MGHImageIO
    MRMLIDImageIO
    HDF5ImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.




ReadData: This is not a nrrd file


ReadData: Failed to instantiate a file reader


ReadData: Cannot read file as a volume of type Volume[fullName = /tmp/Slicer/RemoteIO/MR-head.nrrd]
    Number of files listed in the node = 0.
    File reader says it was able to read 0 files.
    File reader used the archetype file name of /tmp/Slicer/RemoteIO/MR-head.nrrd []
ITK exception info: error in unknown
 Could not create IO object for reading file /tmp/Slicer/RemoteIO/MR-head.nrrd
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    MGHImageIO
    MRMLIDImageIO
    HDF5ImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.
`

 

On Thu, Feb 16, 2017 at 1:06 AM, Tamas Ungi <[hidden email]> wrote:

The MRHead example should be in volumeNode by the time that line is called.

When you run just this much of the code:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

do you see a head MRI image in the Slicer viewers?

 

 

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: February 15, 2017 2:27 PM
To: Tarun Kumar Yadav <
[hidden email]>; Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <
[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

volumeNode variable contains nothing. You can get the volume node by calling

slicer.util.getNode(‘YourNodeName’)

or

slicer.mrmlScene.GetNodeByID(…)

etc, depending on your way of accessing your volume node.

 

 

From: slicer-devel [[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: Wednesday, February 15, 2017 14:24
To: Andras Lasso <
[hidden email]>
Cc: SPL Slicer Devel <
[hidden email]>
Subject: Re: [slicer-devel] use volume rendering in my module

 

I am getting `volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())
AttributeError: 'NoneType' object has no attribute 'AddAndObserveDisplayNodeID'` error now. What may be the issue ?

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <
[hidden email]>
Cc: SPL Slicer Devel <
[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <
[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110

 

On Thu, Feb 16, 2017 at 12:13 AM, Andras Lasso <[hidden email]> wrote:

The highlighted showVolumeRendering sets up volume rendering. You should see the volume in the 3D view.  Full example:

 

import SampleData

sampleDataLogic = SampleData.SampleDataLogic()

volumeNode = sampleDataLogic.downloadMRHead()

 

volRenderingLogic = slicer.modules.volumerendering.logic()

volumeRenderingDisplayNode = volRenderingLogic.CreateVolumeRenderingDisplayNode()

slicer.mrmlScene.AddNode(volumeRenderingDisplayNode)

volumeRenderingDisplayNode.UnRegister(volRenderingLogic)

volRenderingLogic.UpdateDisplayNodeFromVolumeNode(volumeRenderingDisplayNode,volumeNode)

volumeNode.AddAndObserveDisplayNodeID(volumeRenderingDisplayNode.GetID())

 

volumeRenderingDisplayNode.SetVisibility(True)

volumeRenderingWidgetRep = slicer.modules.volumerendering.widgetRepresentation()

volumeRenderingWidgetRep.setMRMLVolumeNode(volumeNode)

 

Andras

 

From: Tarun Kumar Yadav [mailto:[hidden email]]
Sent: February 15, 2017 13:28
To: Andras Lasso <
[hidden email]>
Cc: SPL Slicer Devel <
[hidden email]>
Subject: Re: use volume rendering in my module

 

Can you please elaborate `Set up volume rendering` part. I loaded the volume. How can I setup volume rendering after that? I went through the link but that didn't helped much.

 

On Wed, Feb 15, 2017 at 6:13 PM, Andras Lasso <[hidden email]> wrote:

Load a volume from file:

slicer.util.openAddVolumeDialog()

 

Set up volume rendering:

https://github.com/SlicerIGT/SlicerIGT/blob/master/PlusRemote/PlusRemote.py#L1208..L1233

 

Andras

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Tarun Kumar Yadav
Sent: February 15, 2017 2:06
To: SPL Slicer Devel <
[hidden email]>
Subject: [slicer-devel] use volume rendering in my module

 

How to create a simple module( slicelet), that have an add button and a 3d volume rendering of the data on load ? Any kind of help will be appreciated.


--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110


_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110
http://www.iiitd.ac.in/sites/default/files/images/site/iiitd-logo.jpg




--

Regards,

Tarun kumar yadav

B.Tech 3rd year (CSE)

Roll no. 2014110


_______________________________________________
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
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ