[Insight-users] vtkStructuredGridReader (00000000025B4890): Cannot read dataset type: structured_points

Bill Lorensen bill.lorensen at gmail.com
Tue Feb 12 10:28:34 EST 2013


My guess is that the data is not a structured grid. Can you post the
first few lines of the data file/ It is too big to attach.

On Tue, Feb 12, 2013 at 2:44 AM, yas --- <yas2349 at gmail.com> wrote:
>
>
> Hi ,When I run the following code, the following error occurs
>
> The input file is attached to e-mail.
> How to solve this error?thanks a lot!
>
>
> #include <vtkSmartPointer.h>
> #include <vtkPolyDataMapper.h>
> #include <vtkStructuredGridReader.h>
> #include <
> vtkStructuredGridGeometryFilter.h>
> #include <vtkRenderWindow.h>
> #include <vtkRenderWindowInteractor.h>
> #include <vtkRenderer.h>
> #include <vtkImageData.h>
> int main(int argc, char* argv[])
> {
> //  // Verify input arguments
> //  /*if ( argc != 2 )
> //    {
> //    std::cout << "Usage: " << argv[0]
> //              << " Filename(.vtk)" << std::endl;
> //    return EXIT_FAILURE;
> //    }*/
>
>  std::string inputFilename = "C:\\VTK\\VTKData\\Data\\tooth.vtk";
>
>
>   vtkSmartPointer<vtkStructuredGridReader> reader =
>     vtkSmartPointer<vtkStructuredGridReader>::New();
>   reader->SetFileName(inputFilename.c_str());
>   reader->Update();
> //
>   vtkSmartPointer<vtkStructuredGridGeometryFilter> geometryFilter =
>     vtkSmartPointer<vtkStructuredGridGeometryFilter>::New();
>   geometryFilter->SetInputConnection(reader->GetOutputPort());
>   geometryFilter->Update();
>
>   // Visualize
>   vtkSmartPointer<vtkPolyDataMapper> mapper =
>     vtkSmartPointer<vtkPolyDataMapper>::New();
>   mapper->SetInputConnection(geometryFilter->GetOutputPort());
>
>   vtkSmartPointer<vtkActor> actor =
>     vtkSmartPointer<vtkActor>::New();
>   actor->SetMapper(mapper);
>
>   vtkSmartPointer<vtkRenderer> renderer =
>     vtkSmartPointer<vtkRenderer>::New();
>   vtkSmartPointer<vtkRenderWindow> renderWindow =
>     vtkSmartPointer<vtkRenderWindow>::New();
>   renderWindow->AddRenderer(renderer);
>   vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
>     vtkSmartPointer<vtkRenderWindowInteractor>::New();
>   renderWindowInteractor->SetRenderWindow(renderWindow);
>
>   renderer->AddActor(actor);
>   renderer->SetBackground(.3, .6, .3); // Background color green
>
>   renderWindow->Render();
>   renderWindowInteractor->Start();
>
>   return EXIT_SUCCESS;
> }
>
>
> ERROR: In ..\..\VTK\IO\vtkStructuredGridReader.cxx, line 103
> vtkStructuredGridReader (00000000025B4890): Cannot read dataset type:
> structured_points
>
> ERROR: In ..\..\VTK\IO\vtkStructuredGridReader.cxx, line 198
> vtkStructuredGridReader (00000000025B4890): Cannot read dataset type:
> structured_points
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the Insight-users mailing list