SNAP developer snapshot: RGB overlay and mesh export

20 views
Skip to first unread message

Paul Yushkevich

unread,
Jun 7, 2007, 9:16:36 AM6/7/07
to Markus Karlsson, itksn...@googlegroups.com
Dear ITK-SNAP developers,

We have been working to add a couple new features to SNAP: display of color images (as standalone, or as an overlay over grayscale images) and VTK mesh export. Both of these features have been frequently requested. The RGB image feature, useful for visualizing vector fields arising from DTI analysis, as well as histology data, has been contributed by Hui Zhang. Currently, MHA and VTK formats can be used to load RGB data.

The source code with these features is available on the sourceforge CVS

cvs -d:pserver:anon...@itk-snap.cvs.sourceforge.net:/cvsroot/itk-snap login
cvs -z3 -d:pserver:anon...@itk-snap.cvs.sourceforge.net:/cvsroot/itk-snap co -P itksnap

And the Windows binary is also available

http://downloads.sourceforge.net/itk-snap/itksnap-snapshot-2007-06-07.exe

As always, we would appreciate your help with testing and debugging this new version.

Thank you!
Paul.


--
Paul A. Yushkevich, Ph.D.
Research Assistant Professor
Penn Image Computing and Science Laboratory (PICSL)
Department of Radiology,
University of Pennsylvania

Padfield, Dirk R (GE, Research)

unread,
Jun 7, 2007, 1:09:16 PM6/7/07
to itksn...@googlegroups.com
Hello ITK SNAP developers,
    I have been working with SNAP for viewing segmentations of cells resulting in many hundreds of labels, and SNAP has limitations with more than 255 labels.  Paul has been helping me with this problem, but there are still some issues, so I thought I would ask whether anyone has any thoughts on this.  I have posted my correspondence with Paul below.
    Thanks!   
    Dirk.
 
 
Hello Dr. Yushkevich,
    Thank you very much for you quick reply and for your help!  I made the change, and it worked!  When I load in a label image with more than 256 labels, the label values above 255 are correctly displayed.  However, no color is associated with the labels, and when I try to add them using the "edit labels" button, I get an error that "the label ID must be a number between 1 and 255".  Did you also have this problem?  Were you able to see the labels above 255 as color labels?  If you have any thoughts on this, I would appreciate it.
    Thanks again!
    Dirk. 


From: Paul Yushkevich [mailto:pyush...@gmail.com]
Sent: Monday, April 09, 2007 7:57 AM
To: Padfield, Dirk R (GE, Research)
Subject: Re: ITK SNAP labels

Hi Dirk,

I would first try changing the LabelType in SNAPCommon.h to unsigned short, along with increasing the value of MAX_COLOR_LABELS. I tried this, and it seems to work except in the 3D rendering code. But at least it seems to let you load and view images with more than 255 labels. I will try to make this change in the next release.

Paul.



On 4/8/07, Padfield, Dirk R (GE, Research) < padf...@research.ge.com> wrote:

Hello Dr. Yushkevich,

My name is Dirk Padfield, and I work at the GE Global Research Center in NY.  I use SNAP frequently for viewing the results of my cell image segmentations, and I find it a very useful tool for visualizing the data.  I have a quick question for you about the number of labels in SNAP.  Often, there are more than 256 cells in an image, so cells numbered above 255 in the original data, say x, get numbered x mod 256.  This becomes confusing because several cells have the same number although they don't in the data read in.  Also, cells that have an original label that is a multiple of 256 get mapped to 0 and therefore get cleared (using the default color map).  If the type of the label mask could be changed (I believe it is now UChar) to one that could accommodate more labels, that would be very useful.

I have a CVS checkout of InsightSNAP through InsightApplications, and I have looked through the code to find how to change this for my local copy.  I found in InsightApplications\SNAP\Common\SNAPCommon.h that there is a variable called MAX_COLOR_LABELS that is set to 256, but simply changing this to a higher value didn't seem to solve the problem.  It seems that there should be an easy way to modify this, but I am not familiar enough with the code.  If you could give me some insight, I would greatly appreciate it.

Thank you,
Dirk.

Dirk Ryan Padfield
Computer Scientist
Visualization and Computer Vision Lab
GE Global Research Center

Ferrari V

unread,
Jun 20, 2007, 10:01:54 AM6/20/07
to itksn...@googlegroups.com
Dear Paul,
I tried to export a mesh in STL format but the result is an unreadeable file like the attached one.
(there is no information inside).
 
 
Thank you and Best Regards
Vincenzo
 
_____________________________________________
 
Vincenzo Ferrari, PhD student
 
EndoCAS Center
Divisione di Chirurgia Generale e Trapianti
Università di Pisa
Ospedale di Cisanello, Via Paradisa 2
56124 Pisa, Italy
web: www.endocas.org
 
Phone: (+39) 050 995 625
Fax: (+39) 050 995 676
_________________________
Arteria1
Reply all
Reply to author
Forward
0 new messages