[vtkusers] error in vtk building

Luca Cinquepalmi cinquepalmi at planetek.it
Thu Jan 20 03:44:32 EST 2011


Hi users, when I compile vtk with cmake in Windows, the following error 
occurs:

CMake Error at C:/Programmi/CMake 
2.8/share/cmake-2.8/Modules/TestBigEndian.cmake:44 (MESSAGE):

no suitable type found

Call Stack (most recent call first):

CMake/CMakeBackwardCompatibilityC.cmake:31 (TEST_BIG_ENDIAN)

CMakeLists.txt:428 (INCLUDE)


What does it mean? shall I modify some option? thanks

Luca





Il 20/01/2011 0.21, Xiaopeng Yang ha scritto:
>
> Hi users,
>
> I raised a question in my previous email, but still I could not see 
> any suggestion or advice from you. Please give me a hand if anyone of 
> you knows how to solve the problem. I would appreciate very much!
>
> Thanks,
>
> Yang
>
> *From:*vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] *On 
> Behalf Of *Xiaopeng Yang
> *Sent:* Wednesday, January 19, 2011 6:29 PM
> *To:* 'vtk'; insight-users at itk.org
> *Subject:* [vtkusers] Polydata volume calculation problem
>
> Dear VTK and ITK users,
>
> I tried to calculate polydata volume through vtkMassProperties. 
> Firstly, the polydata was generated from a set of 3D points. Then I 
> applied vtkSurfaceReconstructionFilter to generate a surface. And then 
> a contour was generated by vtkContourFilter. After several other 
> steps, I got the volume by vtkMassProperties.
>
> The problem is:
>
> 1.Whether my code is proper to calculate polydata volume?
>
> 2.When I change the SetValue(0, 10) of vtkContourFilter to some value 
> else, for example, SetValue(0, 20), the calculated volumes under the 
> two conditions are very different. What value is proper to calculate 
> volume?
>
> 3.What is the correct way to calculate polydata volume?
>
> Thanks very much! The following is the code:
>
>         for(i = 0; i < spl_max; i++)
>
>               {
>
>                      points->InsertNextPoint(segment_point_list[i][0], 
> segment_point_list[i][1], segment_point_list[i][2]);
>
>               }
>
>         polydata->SetPoints(points);
>
>         vtkSurfaceReconstructionFilter *surf = 
> vtkSurfaceReconstructionFilter::New();
>
>         surf->SetInput(polydata);
>
>         vtkContourFilter *contours = vtkContourFilter::New();
>
>         contours->SetInputConnection(surf->GetOutputPort());
>
>         contours->SetValue(0,10);
>
> // # Extract boundary edges
>
>         vtkFeatureEdges *boundary = vtkFeatureEdges::New();
>
>         boundary->BoundaryEdgesOn();
>
>         boundary->FeatureEdgesOff();
>
>         boundary->ManifoldEdgesOff();
>
>         boundary->NonManifoldEdgesOff();
>
>         boundary->SetInputConnection(contours->GetOutputPort());
>
> // # Build a polyline from boundary edges
>
>         vtkStripper *stripper = vtkStripper::New();
>
>         stripper->SetInputConnection(boundary->GetOutputPort());
>
>         stripper->Update();
>
>         vtkPolyData *holePoly = vtkPolyData::New();
>
>         holePoly->SetPoints(stripper->GetOutput()->GetPoints());
>
>         holePoly->SetPolys(stripper->GetOutput()->GetLines());
>
> // # Triangulate hole
>
>         vtkTriangleFilter *filler = vtkTriangleFilter::New();
>
>         filler->SetInput(holePoly);
>
> // # Combine into a single polydata
>
>         vtkAppendPolyData *apd = vtkAppendPolyData::New();
>
>         apd->AddInputConnection(contours->GetOutputPort());
>
>         apd->AddInputConnection(filler->GetOutputPort());
>
> // # Merge duplicate points
>
>         vtkCleanPolyData *cleaner = vtkCleanPolyData::New();
>
>         cleaner->AddInputConnection(apd->GetOutputPort());
>
> // # Add normals
>
>         vtkPolyDataNormals *apdNormals = vtkPolyDataNormals::New();
>
>         apdNormals->SetInputConnection(cleaner->GetOutputPort());
>
>         vtkReverseSense *reverse = vtkReverseSense::New();
>
>         reverse->SetInputConnection(apdNormals->GetOutputPort());
>
>         reverse->ReverseCellsOn();
>
>         reverse->ReverseNormalsOn();
>
>         vtkTriangleFilter *triangle = vtkTriangleFilter::New();
>
>         triangle->SetInputConnection(reverse->GetOutputPort());
>
>         vtkMassProperties *massProperty = vtkMassProperties::New();
>
>         massProperty->SetInputConnection(triangle->GetOutputPort());
>
>        massProperty->Update();
>
> double vol = massProperty->GetVolume();
>
>
> _______________________________________________
> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110120/c9cf597b/attachment.htm>


More information about the vtkusers mailing list