[vtkusers] vtkMarchingCubes (06F5BC18): Cannot contour data of dimension != 3

Bill Lorensen bill.lorensen at gmail.com
Mon Jul 1 08:04:03 EDT 2013


Looks like your data is probably a single image (2D). Use
vtkMarchingSquares instead.


On Sun, Jun 30, 2013 at 9:54 PM, louiskoo <419655660 at qq.com> wrote:

>   bmpRead.SetFilePrefix(@"d:\temp\");
>             bmpRead.SetFilePattern("%s%d.bmp");
>             bmpRead.SetFileNameSliceOffset(1);
>             //bmpRead.SetFileNameSliceSpacing(1);
>
>             //bmpRead.SetFileNames(array);
>             bmpRead.Update();
>
>             vtkImageData imageData = bmpRead.GetOutput();
>
>  // extract the skin
>             vtkMarchingCubes _skinExtractor = new vtkMarchingCubes();
>             _skinExtractor.SetInput(imageData);
>             _skinExtractor.Update();
>             Console.WriteLine("Extractor.Update(); Done");
>
>             //_skinExtractor.SetValue(0, 155);
>             _skinExtractor.SetValue(0, ISO);
>             _skinExtractor.Update();
>
>             vtkStripper _skinStripper = new vtkStripper();
>             _skinStripper.SetInput(_skinExtractor.GetOutput());
>             _skinStripper.Update();
>             Console.WriteLine("Stripper.Update(); Done");
>
>             vtkPolyData polyData = _skinStripper.GetOutput();
>
>
> // Visualize
>             vtkPolyDataMapper mapper = vtkPolyDataMapper.New();
>             mapper.SetInput(polyData);
>
>             vtkActor actor = vtkActor.New();
>             actor.SetMapper(mapper);
>             actor.GetProperty().SetPointSize(4);
>             //actor.GetProperty().SetColor(255,0,0);
>
>             vtkCamera camera = vtkCamera.New();
>             camera.SetPosition(0, 0, 100);
>             camera.SetFocalPoint(0, 0, 0);
>
>
>
>             vtkRenderWindow renderWindow =
> renderWindowControl1.RenderWindow;
>             vtkRenderer renderer =
> renderWindow.GetRenderers().GetFirstRenderer();
>             renderer.SetBackground(0.2,0.3,0.4);
>             renderer.AddActor(actor);
>             double[] originalViewport = { 0.0, 0.0, 0.8, 0.6 };
>             //renderer.SetViewport(originalViewport[0] ,originalViewport[1]
> ,originalViewport[2] ,originalViewport[3]);
>             //renderer.SetActiveCamera(camera);
>             renderer.Render();
>             renderWindowControl1.Refresh();
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/vtkMarchingCubes-06F5BC18-Cannot-contour-data-of-dimension-3-tp5721693.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>



-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130701/70279351/attachment.htm>


More information about the vtkusers mailing list