15 #include <vtkPolyDataReader.h> 16 #include <vtkPolyDataWriter.h> 17 #include <vtkPolyData.h> 18 #include <ctkPluginContext.h> 29 return this->
readInto(boost::dynamic_pointer_cast<Mesh>(data), filename);
39 mesh->setVtkPolyData(raw);
69 std::vector<DataPtr> retval;
75 mesh->setVtkPolyData(raw);
77 retval.push_back(mesh);
83 MeshPtr mesh = boost::dynamic_pointer_cast<
Mesh>(data);
87 writer->SetInputData(mesh->getVtkPolyData());
101 QString fileType = QFileInfo(filename).suffix();
102 return ( fileType.compare(
"vtk", Qt::CaseInsensitive) == 0);
QString canWriteDataType() const
void reportError(QString msg)
DataPtr createData(QString type, QString filename, QString name="") const
virtual vtkPolyDataPtr loadVtkPolyData(QString filename)
virtual bool readInto(DataPtr data, QString path)
cstring_cast_Placeholder cstring_cast(const T &val)
virtual QString canReadDataType() const
PolyDataMeshReader(PatientModelServicePtr patientModelService)
virtual DataPtr read(const QString &uid, const QString &filename)
boost::shared_ptr< class Data > DataPtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
virtual void write(DataPtr data, const QString &filename)
vtkSmartPointer< class vtkPolyDataWriter > vtkPolyDataWriterPtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
static bool checkedRead(vtkSmartPointer< vtkAlgorithm > reader, QString filename)
vtkSmartPointer< class vtkPolyDataReader > vtkPolyDataReaderPtr
static QString getTypeName()
virtual bool canRead(const QString &type, const QString &filename)
boost::shared_ptr< class Mesh > MeshPtr
bool canWrite(const QString &type, const QString &filename) const
bool canWriteInternal(const QString &type, const QString &filename) const
Namespace for all CustusX production code.