[vtkusers] Re: How to get curvature value for each point

Amy Squillacote amy.squillacote at kitware.com
Tue Apr 3 09:37:12 EDT 2007


Please keep the discussion on the vtkusers list. This way other people 
can help answer your questions, and the whole discussion will be 
archived for future reference.

I should have explicitly stated it in my previous e-mail, but yes, 
myCurvatures->GetOutput()->GetPointData()->GetScalars(); will return the 
curvature values. The index into this array is the point Id per point in 
your output dataset. My point was that without calling Update(), the 
above would not return the desired curvature values because the output 
of the filter would be empty.

- Amy

haythem.jaidi at hotmail.com wrote:
> Thanks for your interest . I want to no if the instruction below return the points curvatrure values or not :
> vtkDataArray *array = myCurvatures->GetOutput()->GetPointData()->GetScalars();
> Amy Squillacote wrote:
>   
>> Be sure to call curv->Update() before getting the scalars array. 
>> Otherwise the output will contain no data.
>>
>> - Amy
>>
>> Syn3DDM wrote:
>>     
>>> Hi
>>> I know that the vtkCurvatures class computes the curvature of the mesh at
>>> each point, but I don't know how to get the curvature value of a specific
>>> point.
>>> I want to asck you if this code is correct :
>>>
>>>  vtkCurvatures *curv = vtkCurvatures::New();
>>>  curv->SetInput(input);
>>> vtkDoubleArray *curvValue = vtkDoubleArray::New();
>>>  curvValue->SetNumberOfComponents(1);
>>>  curvValue->DeepCopy(curv->GetOutput()->GetPointData()->GetScalars());
>>>
>>> Is curvValue contains the values of all points curvature ??
>>>
>>> Please help me!
>>>
>>>
>>>     
>>>
>>>   
>>>       
>> -- 
>> Amy Squillacote
>> Kitware, Inc.
>> 28 Corporate Drive
>> Clifton Park, NY 12065
>> Phone: (518) 371-3971 x106
>>
>> _______________________________________________
>> This is the private VTK discussion list. 
>> Please keep messages on-topic. Check the FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>>     
> Quoted from: 
> http://www.nabble.com/How-to-get-curvature-value-for-each-point-tf3512415.html#a9810620
>
>
>   

-- 
Amy Squillacote
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
Phone: (518) 371-3971 x106




More information about the vtkusers mailing list