29 DummyReader(
const std::string &mimeTypeName,
const std::string &extension,
int priority) :
mitk::
AbstractFileReader()
32 mimeType.AddExtension(extension);
33 mimeType.SetComment(
"This is a dummy description");
44 m_ServiceReg.Unregister();
49 virtual std::vector<itk::SmartPointer<mitk::BaseData>>
Read()
override
51 std::vector<mitk::BaseData::Pointer> result;
56 DummyReader *
Clone()
const override {
return new DummyReader(*
this); }
64 DummyReader2(
const std::string &mimeTypeName,
const std::string &extension,
int priority) :
mitk::
AbstractFileReader()
67 mimeType.AddExtension(extension);
68 mimeType.SetComment(
"This is a second dummy description");
78 m_ServiceReg.Unregister();
83 virtual std::vector<itk::SmartPointer<mitk::BaseData>>
Read()
override
85 std::vector<mitk::BaseData::Pointer> result;
90 DummyReader2 *
Clone()
const override {
return new DummyReader2(*
this); }
DataCollection - Class to facilitate loading/accessing structured data.
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
virtual std::vector< itk::SmartPointer< BaseData > > Read() override=0
Reads a path or stream and creates a list of BaseData objects.
int mitkFileReaderRegistryTest(int, char *[])
void SetMimeType(const CustomMimeType &mimeType)
The CustomMimeType class represents a custom mime-type which may be registered as a service object...
us::ServiceRegistration< IFileReader > RegisterService(us::ModuleContext *context=us::GetModuleContext())
void SetRanking(int ranking)
Set the service ranking for this file reader.
Base class for creating mitk::BaseData objects from files or streams.