33 #ifndef AIMS_ANYTYPE_READER_DETAILS_H
34 #define AIMS_ANYTYPE_READER_DETAILS_H
53 template <
typename TCaller,
typename TFile >
54 bool anytype_reader(Process & p,
const std::string & filein, Finder & f)
56 typedef typename TCaller::return_type return_type;
57 typedef typename TCaller::convertor_type::template Type<TFile, return_type>::type convertor_type;
60 TCaller & atr =
dynamic_cast<TCaller &
>(p);
64 Reader<TFile> r(filein);
65 std::string format = f.format();
66 r.read(data, 0, &format);
69 convertor_type convert;
70 convert.convert(data, atr.get());
79 template <
typename T,
typename TConvertorFamily >
83 this->registerProcesses();
87 template <
typename T,
typename TConvertorFamily >
99 registerProcessType(
"Volume",
"FLOAT", &anytype_reader<Self,
AimsData< float > >);
106 template <
typename T,
typename TConvertorFamily >
109 , m_filename(filename)
113 template <
typename T,
typename TConvertorFamily >
A process to read an object of type T, even if the type on file is different.
AnyTypeReaderProcess(const T &init)
Initialize result with init.
void read(T &out)
read file and get result.
AnyTypeReader(std::string filename)
initialize with the name of the file to be read.
The class for EcatSino data write operation.
const AlgorithmCaller::LaunchExecution execute