13 #include <itksys/SystemTools.hxx> 14 #include <itkImageFileReader.h> 15 #include <itkNrrdImageIO.h> 24 std::vector<itk::SmartPointer<mitk::BaseData> > result;
25 typedef itk::ImageFileReader<ImageType> FileReaderType;
26 FileReaderType::Pointer reader = FileReaderType::New();
28 itk::NrrdImageIO::Pointer io = itk::NrrdImageIO::New();
29 reader->SetImageIO(io);
34 result.push_back(img.GetPointer());
61 mimeType.
SetComment(
"Experimental MBI LabelSetImage");
std::vector< itk::SmartPointer< BaseData > > Read() override
Reads a path or stream and creates a list of BaseData objects.
itk::Image< unsigned char, 3 > ImageType
~DummyLsetFileReader() override
void SetComment(const std::string &comment)
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 SetDescription(const std::string &description)
void AddExtension(const std::string &extension)
void SetCategory(const std::string &category)
void CastToMitkImage(const itk::SmartPointer< ItkOutputImageType > &itkimage, itk::SmartPointer< mitk::Image > &mitkoutputimage)
Cast an itk::Image (with a specific type) to an mitk::Image.
Base class for creating mitk::BaseData objects from files or streams.
std::string GetInputLocation() const override
Get the current input location.
std::string GetMimeTypePrefix() const