Batch-mode visualization

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

Batch-mode visualization

Sharp, Gregory C.
Hello Slicers,

Has anyone successfully used Slicer to do batch visualization?  
The application is evaluation of atlas-based
segmentation.  Something like the below would be ideal.

Do until complete:
  load images and labelmaps
  move viewing planes to center of structure
  set w/l, blending, opacity
  take screen capture, save as png file

Presumably this involves writing a python script.
Has anyone ever done something like this?  Any hints
or pointers would be greatly appreciated.

Thank you,
Greg
_______________________________________________
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: Batch-mode visualization

Steve Pieper
Hi Greg - 

A lot of the self tests do basically what you described.  I good one to look at would be the SlicerMRBTest, which you can find here:


the others in that directory, like the RSNA2012* tests have similar structures and exercise different parts of the API.

It's very easy to save a png file of a widget:

>>> p = qt.QPixmap.grabWidget(slicer.util.mainWindow()).toImage()

>>> p.save('/tmp/file.png')


Of course you could do all of the same things in C++, but I suggest writing it as a python scripted module self test since you will be able to write the test and debug it without compiling or exiting slicer.


HTH,
Steve

On Tue, Jan 15, 2013 at 1:40 PM, Sharp, Gregory C. <[hidden email]> wrote:
Hello Slicers,

Has anyone successfully used Slicer to do batch visualization?
The application is evaluation of atlas-based
segmentation.  Something like the below would be ideal.

Do until complete:
  load images and labelmaps
  move viewing planes to center of structure
  set w/l, blending, opacity
  take screen capture, save as png file

Presumably this involves writing a python script.
Has anyone ever done something like this?  Any hints
or pointers would be greatly appreciated.

Thank you,
Greg
_______________________________________________
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: Batch-mode visualization

Christopher Mullins
In reply to this post by Sharp, Gregory C.
To get you started, check out the tutorial on running a CLI from Python.


On Tue, Jan 15, 2013 at 2:40 PM, Sharp, Gregory C. <[hidden email]> wrote:
Hello Slicers,

Has anyone successfully used Slicer to do batch visualization?
The application is evaluation of atlas-based
segmentation.  Something like the below would be ideal.

Do until complete:
  load images and labelmaps
  move viewing planes to center of structure
  set w/l, blending, opacity
  take screen capture, save as png file

Presumably this involves writing a python script.
Has anyone ever done something like this?  Any hints
or pointers would be greatly appreciated.

Thank you,
Greg
_______________________________________________
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



--
Christopher Mullins
R&D Engineer
Kitware Inc.,
919.869.8871

_______________________________________________
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