15 #include <vtkDataReader.h> 16 #include <vtkStructuredPoints.h> 17 #include <vtkStructuredPointsReader.h> 34 vtkDataReader *chooser = vtkDataReader::New();
37 if (chooser->IsFileStructuredPoints())
40 MITK_INFO <<
"StructuredPoints" << std::endl;
41 vtkStructuredPointsReader *reader = vtkStructuredPointsReader::New();
45 if (reader->GetOutput() !=
nullptr)
48 output->Initialize(reader->GetOutput());
49 output->SetVolume(reader->GetOutput()->GetScalarPointer());
55 MITK_ERROR <<
" ... sorry, this .vtk format is not supported yet." << std::endl;
69 bool extensionFound =
false;
70 std::string::size_type PVTKPos = filename.rfind(
".pvtk");
71 if ((PVTKPos != std::string::npos) && (PVTKPos == filename.length() - 5))
73 extensionFound =
true;
76 PVTKPos = filename.rfind(
".PVTK");
77 if ((PVTKPos != std::string::npos) && (PVTKPos == filename.length() - 5))
79 extensionFound =
true;
84 vtkDataReader *chooser = vtkDataReader::New();
85 chooser->SetFileName(filename.c_str());
86 if (!chooser->IsFileStructuredPoints())
static bool CanReadFile(const std::string filename, const std::string filePrefix, const std::string filePattern)
OutputType * GetOutput()
Get the output data of this image source object.
~VtkImageReader() override
void GenerateData() override