15 #include <vtkPNGReader.h> 16 #include <vtkImageData.h> 17 #include <ctkPluginContext.h> 33 QString fileType = QFileInfo(filename).suffix();
34 return (fileType.compare(
"png", Qt::CaseInsensitive) == 0);
39 return this->
readInto(boost::dynamic_pointer_cast<Image>(data), filename);
49 image->setVtkImageData(raw);
67 std::vector<DataPtr> retval;
73 image->setVtkImageData(raw);
75 retval.push_back(image);
83 pngReader->SetFileName(filename.toStdString().c_str());
85 return pngReader->GetOutput();
bool canWrite(const QString &type, const QString &filename) const
virtual QString canReadDataType() const
DataPtr createData(QString type, QString filename, QString name="") const
boost::shared_ptr< class Image > ImagePtr
PNGImageReader(PatientModelServicePtr patientModelService)
virtual DataPtr read(const QString &uid, const QString &filename)
boost::shared_ptr< class Data > DataPtr
vtkSmartPointer< class vtkPNGReader > vtkPNGReaderPtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
static QString getTypeName()
virtual bool canRead(const QString &type, const QString &filename)
virtual vtkImageDataPtr loadVtkImageData(QString filename)
virtual bool readInto(DataPtr data, QString path)
QString canWriteDataType() const
Namespace for all CustusX production code.