|
NorMIT-nav
22.09
An IGT application
|
Go to the documentation of this file.
15 #include <vtkSTLReader.h>
17 #include <vtkPolyData.h>
20 #include <ctkPluginContext.h>
21 #include <vtkSTLWriter.h>
34 QString fileType = QFileInfo(filename).suffix();
35 return (fileType.compare(
"stl", Qt::CaseInsensitive) == 0);
40 return this->
readInto(boost::dynamic_pointer_cast<Mesh>(data), filename);
50 mesh->setVtkPolyData(raw);
80 std::vector<DataPtr> retval;
86 mesh->setVtkPolyData(raw);
88 retval.push_back(mesh);
94 MeshPtr mesh = boost::dynamic_pointer_cast<Mesh>(data);
98 writer->SetInputData(mesh->getVtkPolyData());
114 return this->canWriteInternal(type, filename);
virtual vtkPolyDataPtr loadVtkPolyData(QString filename)
virtual QString canReadDataType() const
Namespace for all CustusX production code.
vtkSmartPointer< class vtkSTLReader > vtkSTLReaderPtr
virtual DataPtr read(const QString &uid, const QString &filename)
QString canWriteDataType() const
virtual bool readInto(DataPtr data, QString path)
cstring_cast_Placeholder cstring_cast(const T &val)
static QString getTypeName()
boost::shared_ptr< class Mesh > MeshPtr
bool canWrite(const QString &type, const QString &filename) const
void write(DataPtr data, const QString &filename)
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
boost::shared_ptr< class Data > DataPtr
vtkSmartPointer< class vtkSTLWriter > vtkSTLWriterPtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
static bool checkedRead(vtkSmartPointer< vtkAlgorithm > reader, QString filename)
StlMeshReader(PatientModelServicePtr patientModelService)
DataPtr createData(QString type, QString filename, QString name="") const
virtual bool canRead(const QString &type, const QString &filename)
void reportError(QString msg)