31 std::string category =
"ContourModelSet File";
48 std::vector<itk::SmartPointer<mitk::BaseData>> result;
49 std::vector<itk::SmartPointer<mitk::BaseData>> internalResult;
51 std::string location = GetInputLocation();
62 internalResult = reader.
Read();
64 for (
unsigned int i = 0; i < internalResult.size(); ++i)
66 contourSet->AddContourModel(dynamic_cast<mitk::ContourModel *>(internalResult.at(i).GetPointer()));
68 result.push_back(dynamic_cast<mitk::BaseData *>(contourSet.GetPointer()));
virtual std::vector< itk::SmartPointer< BaseData > > Read() override
Reads a path or stream and creates a list of BaseData objects.
virtual ~ContourModelSetReader()
DataCollection - Class to facilitate loading/accessing structured data.
virtual std::vector< itk::SmartPointer< BaseData > > Read() override
Reads a path or stream and creates a list of BaseData objects.
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())
Convenience class to temporarily change the current locale.
void SetDescription(const std::string &description)
void AddExtension(const std::string &extension)
void SetCategory(const std::string &category)
Base class for creating mitk::BaseData objects from files or streams.
virtual void SetInput(const std::string &location) override
Set the input location.