17 #include <itksys/SystemTools.hxx>
19 #include <vtkDataReader.h>
20 #include <vtkPolyDataReader.h>
21 #include <vtkXMLPolyDataReader.h>
36 MITK_INFO <<
"Loading " << m_FileName <<
" as vtk" << std::endl;
38 std::string ext = itksys::SystemTools::GetFilenameLastExtension(m_FileName);
39 ext = itksys::SystemTools::LowerCase(ext);
44 chooser->SetFileName(m_FileName.c_str());
45 if (chooser->IsFilePolyData())
48 itkDebugMacro(<<
"PolyData");
50 reader->SetFileName(m_FileName.c_str());
53 if (reader->GetOutput() !=
nullptr)
56 output->SetVtkPolyData(reader->GetOutput());
63 else if (ext ==
".vtp")
66 if (reader->CanReadFile(m_FileName.c_str()))
69 itkDebugMacro(<<
"XMLPolyData");
70 reader->SetFileName(m_FileName.c_str());
73 if (reader->GetOutput() !=
nullptr)
76 output->SetVtkPolyData(reader->GetOutput());
84 itkWarningMacro(<<
" ... sorry, this .vtk format is not supported yet.");
97 std::string ext = itksys::SystemTools::GetFilenameLastExtension(filename);
98 ext = itksys::SystemTools::LowerCase(ext);
102 chooser->SetFileName(filename.c_str());
103 if (!chooser->IsFilePolyData())
110 else if (ext ==
".vtp")
113 if (!chooser->CanReadFile(filename.c_str()))
static bool CanReadFile(const std::string filename, const std::string filePrefix, const std::string filePattern)
static const std::string filename
virtual void GenerateData() override
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.