Displaying surface vectors

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

Displaying surface vectors

Jonathan DuBois-2
Hello,

I am trying to display .vtk files from FSL First for Subcortical
Shape. In FSL, this data includes vectors of directional shape
difference. I can load the .vtk file and display the overlay color,
but not the vectors. Is there a way to display these vectors in Slicer
3.6?

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

Re: Displaying surface vectors

inorton
Hi Jonathan,

1. What do you normally use to view these files - FSLView? Please send a screenshot of the usual view.
2. if possible, please send a sample .vtk file.

My guess is the data needs to go through a glyphing filter to get vector to show up. This can probably be done with a few lines in the console, but is most likely not implemented for automatic use right now.

-Isaiah

On Thu, Mar 24, 2011 at 2:08 PM, Jonathan DuBois <[hidden email]> wrote:
Hello,

I am trying to display .vtk files from FSL First for Subcortical
Shape. In FSL, this data includes vectors of directional shape
difference. I can load the .vtk file and display the overlay color,
but not the vectors. Is there a way to display these vectors in Slicer
3.6?

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


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

Re: Displaying surface vectors

inorton
Hi Jonathan,
Thanks for the example vtk file, and the reminder.

I looked at how FSLView does it, and to my knowledge this is not implemented in Slicer. I've attached some code that calls the same glyphing sequence as FSLView, except in Python. You can cut and paste this into the Slicer python shell, available from Window->Python Interactor. Also attached is a screenshot of the resulting glyphs in Slicer. The vectors look somewhat different, but I don't know what settings were used in your FSLView example.

Before cut/paste, you need to change the line that says "model = scene.GetNodeByID('vtkMRMLModelNode4')" to match the correct model id in your scene. This can be found in the Data module by clicking the "display mrml ids" checkbox.

You will also need to change the ScaleRange and ScaleFactor to get the desired display - this can be adjusted in the python shell by re-entering the commands with new values. The glyphs will update as soon as you click back into the 3d view.

Hope this helps for quick-display purposes. If you want to interactively select the model, change parameters, etc. you would need to expand this into a GUI module.

-Isaiah


On Fri, Mar 25, 2011 at 9:52 AM, Isaiah Norton <[hidden email]> wrote:
> Hi Jonathan,
>
> 1. What do you normally use to view these files - FSLView? Please send a
> screenshot of the usual view.
> 2. if possible, please send a sample .vtk file.
>
> My guess is the data needs to go through a glyphing filter to get vector to
> show up. This can probably be done with a few lines in the console, but is
> most likely not implemented for automatic use right now.
>
> -Isaiah
>
> On Thu, Mar 24, 2011 at 2:08 PM, Jonathan DuBois
> <[hidden email]> wrote:
>>
>> Hello,
>>
>> I am trying to display .vtk files from FSL First for Subcortical
>> Shape. In FSL, this data includes vectors of directional shape
>> difference. I can load the .vtk file and display the overlay color,
>> but not the vectors. Is there a way to display these vectors in Slicer
>> 3.6?
>>
>> Thanks
>> Jonathan
>> _______________________________________________
>> slicer-users mailing list
>> [hidden email]
>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> To unsubscribe: send email to
>> [hidden email] with unsubscribe as the
>> subject
>
>




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

test.vtk (77K) Download Attachment
mcd_R_9NY0_9NC1_R_Amyg_1.tiff (484K) Download Attachment
SlicerImage_0.png (89K) Download Attachment
fsl-glyph-view.py (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Displaying surface vectors

Jonathan DuBois-2
Hi Isaiah, 

Thank you, this looks pretty straight forward. However, on my mac the python interacter opens in a x11 console that will not allow me to paste the text you sent. I think it is an issue with x11 console, but I was wondering if you had run into this before and might know of a way around it? 

Thanks agian, 

Jonathan


On Wed, Apr 6, 2011 at 11:57 PM, Isaiah Norton <[hidden email]> wrote:
Hi Jonathan,
Thanks for the example vtk file, and the reminder.

I looked at how FSLView does it, and to my knowledge this is not implemented in Slicer. I've attached some code that calls the same glyphing sequence as FSLView, except in Python. You can cut and paste this into the Slicer python shell, available from Window->Python Interactor. Also attached is a screenshot of the resulting glyphs in Slicer. The vectors look somewhat different, but I don't know what settings were used in your FSLView example.

Before cut/paste, you need to change the line that says "model = scene.GetNodeByID('vtkMRMLModelNode4')" to match the correct model id in your scene. This can be found in the Data module by clicking the "display mrml ids" checkbox.

You will also need to change the ScaleRange and ScaleFactor to get the desired display - this can be adjusted in the python shell by re-entering the commands with new values. The glyphs will update as soon as you click back into the 3d view.

Hope this helps for quick-display purposes. If you want to interactively select the model, change parameters, etc. you would need to expand this into a GUI module.

-Isaiah



On Fri, Mar 25, 2011 at 9:52 AM, Isaiah Norton <[hidden email]> wrote:
> Hi Jonathan,
>
> 1. What do you normally use to view these files - FSLView? Please send a
> screenshot of the usual view.
> 2. if possible, please send a sample .vtk file.
>
> My guess is the data needs to go through a glyphing filter to get vector to
> show up. This can probably be done with a few lines in the console, but is
> most likely not implemented for automatic use right now.
>
> -Isaiah
>
> On Thu, Mar 24, 2011 at 2:08 PM, Jonathan DuBois
> <[hidden email]> wrote:
>>
>> Hello,
>>
>> I am trying to display .vtk files from FSL First for Subcortical
>> Shape. In FSL, this data includes vectors of directional shape
>> difference. I can load the .vtk file and display the overlay color,
>> but not the vectors. Is there a way to display these vectors in Slicer
>> 3.6?
>>
>> Thanks
>> Jonathan
>> _______________________________________________
>> slicer-users mailing list
>> [hidden email]
>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> To unsubscribe: send email to
>> [hidden email] with unsubscribe as the
>> subject
>
>





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

Re: Displaying surface vectors

Jonathan DuBois-2
Sorry, I got it to work eventually. Thank you again



On Fri, Apr 8, 2011 at 4:31 PM, Jonathan DuBois <[hidden email]> wrote:
Hi Isaiah, 

Thank you, this looks pretty straight forward. However, on my mac the python interacter opens in a x11 console that will not allow me to paste the text you sent. I think it is an issue with x11 console, but I was wondering if you had run into this before and might know of a way around it? 

Thanks agian, 

Jonathan



On Wed, Apr 6, 2011 at 11:57 PM, Isaiah Norton <[hidden email]> wrote:
Hi Jonathan,
Thanks for the example vtk file, and the reminder.

I looked at how FSLView does it, and to my knowledge this is not implemented in Slicer. I've attached some code that calls the same glyphing sequence as FSLView, except in Python. You can cut and paste this into the Slicer python shell, available from Window->Python Interactor. Also attached is a screenshot of the resulting glyphs in Slicer. The vectors look somewhat different, but I don't know what settings were used in your FSLView example.

Before cut/paste, you need to change the line that says "model = scene.GetNodeByID('vtkMRMLModelNode4')" to match the correct model id in your scene. This can be found in the Data module by clicking the "display mrml ids" checkbox.

You will also need to change the ScaleRange and ScaleFactor to get the desired display - this can be adjusted in the python shell by re-entering the commands with new values. The glyphs will update as soon as you click back into the 3d view.

Hope this helps for quick-display purposes. If you want to interactively select the model, change parameters, etc. you would need to expand this into a GUI module.

-Isaiah



On Fri, Mar 25, 2011 at 9:52 AM, Isaiah Norton <[hidden email]> wrote:
> Hi Jonathan,
>
> 1. What do you normally use to view these files - FSLView? Please send a
> screenshot of the usual view.
> 2. if possible, please send a sample .vtk file.
>
> My guess is the data needs to go through a glyphing filter to get vector to
> show up. This can probably be done with a few lines in the console, but is
> most likely not implemented for automatic use right now.
>
> -Isaiah
>
> On Thu, Mar 24, 2011 at 2:08 PM, Jonathan DuBois
> <[hidden email]> wrote:
>>
>> Hello,
>>
>> I am trying to display .vtk files from FSL First for Subcortical
>> Shape. In FSL, this data includes vectors of directional shape
>> difference. I can load the .vtk file and display the overlay color,
>> but not the vectors. Is there a way to display these vectors in Slicer
>> 3.6?
>>
>> Thanks
>> Jonathan
>> _______________________________________________
>> slicer-users mailing list
>> [hidden email]
>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> To unsubscribe: send email to
>> [hidden email] with unsubscribe as the
>> subject
>
>






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