[Paraview] trouble with Append Attributes

Tom Schoenemann toms at indiana.edu
Thu Jun 28 10:43:46 EDT 2012


Thanks for trying to help, but I'm not sure I understand. Here is what I'm trying to do: color-code a surface based on statistical data that has been calculated for that surface. The problem is that the statistical analysis was done on a voxel-based dataset, not a surface dataset. Contour makes a surface from this data (though it isn't smooth, and clearly retains the boxy step-function appearance). However, I can't get the stat data - which is in exactly the same voxels as the data used for the surface creation by Contour - to display on that surface with the full range of values.  

The first and most important question: is there a way to do this in Paraview? I'm beginning to suspect not. 

Perhaps the issue has to do with the conversion from voxel data to vtk format.  The conversion is done with a utility called c3d from the ITKSNAP group.  The same conversion was done for both the binary data (voxels with 1's representing the surface, and voxels with 0's everywhere else) and the matching stat data file (voxel values represent stats calculated at the same voxels as have 1's in the binary data file, and has 0's everywhere else). Both of the corresponding vtk files appear to be "point data" (not exactly sure what this means) when read into Paraview. I'm assuming (?) that the both the binary data and the stat data occupy exactly the same "points" (not sure what else the conversion would do). 

Perhaps the issue is that Contour is creating a surface based on some exact value, which is an interpolation between 0 and 1 (in my case).  If the surface isn't exactly going through the same point that the stat data corresponds to, maybe Contour  interpolates the stat values to something between the value at that point and the surrounding 0's? If so, I don't understand why, if I tell Contour to use a value of 1 for the isosurface (which I'm assuming means that the surface will go exactly through the points that have the stat data), the stat data values get their range truncated. 

I seem to be misunderstanding what Contour is doing, but the central issue is: How do I get a surface made from the binary data file, and color it with a matching stat data file, given that we are starting with voxel data (that becomes point data when it gets into Paraview)?

-Tom

On Jun 28, 2012, at 9:47 AM, Andy Bauer wrote:

> I think this is the proper behavior. The contour filter isn't scaling values but only keeps the values for the geometry that gets isosurfaced/contoured. For example, if the contour result was a point then the array range would be the field values at that point. If this isn't clear, I suggest using the calculator filter to create a point data array based on coordinates. After you contour that you'll see that the range of the calculator filter result is the same as the domain bounds. You could also check the value of the array at each point to make sure it still matches the local coordinate.
> 
> Andy
> 
> On Wed, Jun 27, 2012 at 11:30 PM, Tom Schoenemann <toms at indiana.edu> wrote:
> I've narrowed it down a bit further. It appears that Contour inexplicably rescales ALL the data arrays, even though only one is used to create the surface.  When I change the Isosurfaces data range (before applying the Contour) to different values (adding different values, adding ranges, etc.), this changes the range of the other data array after I "apply".  I don't want this other array touched.  I'm not sure why this would be the default so I'm suspecting a bug?? Perhaps I'm missing something? 
> 
> In any case, is there actually a way to have Contour create a surface from one data array, but not fuss with the other data array (so that when I have the surface colored with this other array, the data don't get completely changed from real data to something else)?
> 
> -Tom
> 
> On Jun 27, 2012, at 10:50 PM, Tom Schoenemann wrote:
> 
>> Sorry - scratch that. The Append Attributes item DOES claim to have the right values.  According to the Information tab, there are 2 data arrays: One with scalars representing the stat data, and the other called "surface" which ranges from 0 to 1 and was created by the calculator step (see my last note).  However, when I make a Contour out of this item, telling it to use "surface" to do this, it does indeed make a surface, but it inexplicably changes the stat data scalars to a completely new range of [127.863, 128.063].  Note that the Append Attributes item claims to have this same array with [0, 128.619].  
>> 
>> Any ideas? As far as I can tell, Contour inexplicably changes the stat data scalar values to a new range.  ???  Is this a bug, or am I doing something wrong? 
>> 
>> -Tom
>> 
>> On Jun 27, 2012, at 10:36 PM, Tom Schoenemann wrote:
>> 
>>> Hi all,
>>> 
>>> I'm trying to display statistical values in color on a surface.  The stat values are in voxels, originally, but are translated from a NIFTI format file to a .vtk format.  I've got a binary version of the object (1's where the object is, 0's everywhere else). Through comments on this list, I've figured out that if I use the calculator to create a copy of the binary scalar values (and rename them as something else, e.g., "surface"), and then use Append Attributes to combine the stat data scalars with the surface scalars (from the binary image), I can then use Contour to make the surface (using the "surface" scalars) and then color this surface with the stat data scalars.  So far so good. 
>>> 
>>> Here is my problem: When I do Append Attributes, the stat data scalars all get changed to a range of 0 to 1, even though the stat data file that was used in Append Attributes claims to have values of: [0, 128.619].  So, what is going on?  Why is Append Attributes not appending attributes without changing their values??
>>> 
>>> Any ideas?
>>> 
>>> -Tom
>>> 
>>> 
>>> _________________________________________________
>>> P. Thomas Schoenemann
>>> 
>>> Associate Professor
>>> Department of Anthropology
>>> Indiana University
>>> Bloomington, IN  47405
>>> Phone: 812-855-8800
>>> E-mail: toms at indiana.edu
>>> 
>>> Open Research Scan Archive (ORSA) Co-Director
>>> Consulting Scholar
>>> Museum of Archaeology and Anthropology
>>> University of Pennsylvania
>>> 
>>> Homepage: http://mypage.iu.edu/~toms/
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Powered by www.kitware.com
>>> 
>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>> 
>>> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>>> 
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.paraview.org/mailman/listinfo/paraview
>> 
>> _________________________________________________
>> P. Thomas Schoenemann
>> 
>> Associate Professor
>> Department of Anthropology
>> Indiana University
>> Bloomington, IN  47405
>> Phone: 812-855-8800
>> E-mail: toms at indiana.edu
>> 
>> Open Research Scan Archive (ORSA) Co-Director
>> Consulting Scholar
>> Museum of Archaeology and Anthropology
>> University of Pennsylvania
>> 
>> Homepage: http://mypage.iu.edu/~toms/
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Powered by www.kitware.com
>> 
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>> 
>> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
> 
> _________________________________________________
> P. Thomas Schoenemann
> 
> Associate Professor
> Department of Anthropology
> Indiana University
> Bloomington, IN  47405
> Phone: 812-855-8800
> E-mail: toms at indiana.edu
> 
> Open Research Scan Archive (ORSA) Co-Director
> Consulting Scholar
> Museum of Archaeology and Anthropology
> University of Pennsylvania
> 
> Homepage: http://mypage.iu.edu/~toms/
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
> 
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
> 
> 

_________________________________________________
P. Thomas Schoenemann

Associate Professor
Department of Anthropology
Indiana University
Bloomington, IN  47405
Phone: 812-855-8800
E-mail: toms at indiana.edu

Open Research Scan Archive (ORSA) Co-Director
Consulting Scholar
Museum of Archaeology and Anthropology
University of Pennsylvania

Homepage: http://mypage.iu.edu/~toms/









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120628/3720e0ca/attachment-0001.htm>


More information about the ParaView mailing list