|
NorMIT-nav
2023.01.05-dev+develop.0da12
An IGT application
|
Go to the documentation of this file.
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);
116 return this->canWriteInternal(type, filename);
bool canWrite(const QString &type, const QString &filename) const
virtual bool readInto(DataPtr data, QString path)
virtual DataPtr read(const QString &uid, const QString &filename)
Namespace for all CustusX production code.
virtual vtkPolyDataPtr loadVtkPolyData(QString filename)
cstring_cast_Placeholder cstring_cast(const T &val)
vtkSmartPointer< class vtkPolyDataWriter > vtkPolyDataWriterPtr
static QString getTypeName()
boost::shared_ptr< class Mesh > MeshPtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
boost::shared_ptr< class Data > DataPtr
virtual QString canReadDataType() const
QString canWriteDataType() const
virtual void write(DataPtr data, const QString &filename)
vtkSmartPointer< class vtkPolyDataReader > vtkPolyDataReaderPtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
static bool checkedRead(vtkSmartPointer< vtkAlgorithm > reader, QString filename)
DataPtr createData(QString type, QString filename, QString name="") const
PolyDataMeshReader(PatientModelServicePtr patientModelService)
void reportError(QString msg)
virtual bool canRead(const QString &type, const QString &filename)