STIR  6.2.0
MultipleDataSetHeader.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2018, University College London
3  This file is part of STIR.
4 
5  SPDX-License-Identifier: Apache-2.0
6 
7  See STIR/LICENSE.txt for details
8 */
9 #ifndef __stir_MultipleDataSetHeader__H__
10 #define __stir_MultipleDataSetHeader__H__
11 
27 #include "stir/KeyParser.h"
28 
29 START_NAMESPACE_STIR
30 
31 class MultipleDataSetHeader : public KeyParser
32 {
33 public:
35  MultipleDataSetHeader();
36 
38  static const char* const registered_name;
39 
41  std::size_t get_num_data_sets() const { return _num_data_sets; }
42 
44 
45  std::string get_filename(std::size_t i) const { return _filenames.at(i); }
46 
48  template <class VectorOfStringsT>
49  inline static void write_header(const std::string& filename, const VectorOfStringsT& individual_filenames);
50 
51 protected:
53  void read_num_data_sets();
54 
56  virtual void set_defaults();
58  virtual void initialise_keymap();
60  bool post_processing() override;
61 
62  int _num_data_sets;
63  std::vector<std::string> _filenames;
64 };
65 
66 END_NAMESPACE_STIR
67 
69 #endif
Declaration of class stir::KeyParser.
Inline implementations of class stir::MultipleDataSetHeader.
string get_filename(const string &filename_with_directory)
return a std::string containing only the filename (i.e. after directory specifications) ...
Definition: utilities.cxx:161