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());
void write(DataPtr data, const QString &filename)
void reportError(QString msg)
DataPtr createData(QString type, QString filename, QString name="") const
virtual vtkPolyDataPtr loadVtkPolyData(QString filename)
bool canWrite(const QString &type, const QString &filename) const
vtkSmartPointer< class vtkSTLWriter > vtkSTLWriterPtr
cstring_cast_Placeholder cstring_cast(const T &val)
StlMeshReader(PatientModelServicePtr patientModelService)
virtual DataPtr read(const QString &uid, const QString &filename)
boost::shared_ptr< class Data > DataPtr
virtual QString canReadDataType() const
QString canWriteDataType() const
virtual bool readInto(DataPtr data, QString path)
vtkSmartPointer< class vtkSTLReader > vtkSTLReaderPtr
virtual bool canRead(const QString &type, const QString &filename)
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
static bool checkedRead(vtkSmartPointer< vtkAlgorithm > reader, QString filename)
static QString getTypeName()
boost::shared_ptr< class Mesh > MeshPtr
bool canWriteInternal(const QString &type, const QString &filename) const
Namespace for all CustusX production code.