HdfFile.h 832 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // Created by patrik on 10.08.17.
  3. //
  4. #ifndef GRASP_SEGMENTER_HDFFILE_H
  5. #define GRASP_SEGMENTER_HDFFILE_H
  6. #include <string>
  7. #include <vector>
  8. #include <hdf4cpp/HdfItem.h>
  9. class HdfFile {
  10. public:
  11. HdfFile(const std::string& path);
  12. ~HdfFile();
  13. bool isValid();
  14. HdfItem get(const std::string& name);
  15. std::vector<HdfItem> getAll(const std::string& name);
  16. HdfAttribute getAttribute(const std::string& name);
  17. class Iterator;
  18. HdfItem::Iterator begin() const;
  19. HdfItem::Iterator end() const;
  20. private:
  21. int32 getDatasetId(const std::string& name);
  22. int32 getGroupId(const std::string& name);
  23. std::vector<int32> getDatasetIds(const std::string& name);
  24. std::vector<int32> getGroupIds(const std::string& name);
  25. int32 sId;
  26. int32 vId;
  27. };
  28. #endif //GRASP_SEGMENTER_HDFFILE_H