ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkHDF5UltrasoundImageIO.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkHDF5UltrasoundImageIO_h
19#define itkHDF5UltrasoundImageIO_h
20#include "UltrasoundExport.h"
21
22
23// itk namespace first suppresses
24// kwstyle error for the H5 namespace below
25namespace itk
26{}
27namespace H5
28{
29class H5File;
30class DataSpace;
31class DataSet;
32} // namespace H5
33
35
36namespace itk
37{
53
54class Ultrasound_EXPORT HDF5UltrasoundImageIO : public StreamingImageIOBase
55{
56public:
57 ITK_DISALLOW_COPY_AND_MOVE(HDF5UltrasoundImageIO);
58
63
65 itkNewMacro(Self);
66
68 itkOverrideGetNameOfClassMacro(HDF5UltrasoundImageIO);
69
70 virtual bool
71 CanReadFile(const char * fileNameToRead) override;
72
73 virtual void
75
76 virtual void
77 Read(void * buffer) override;
78
79 virtual bool
80 CanWriteFile(const char * fileNameToWrite) override;
81
82 virtual void
84
85 virtual void
86 Write(const void * buffer) override;
87
88protected:
91
92 virtual SizeType
93 GetHeaderSize() const override;
94
95 virtual void
96 PrintSelf(std::ostream & os, Indent indent) const override;
97
98private:
99 template <typename TScalar>
100 std::vector<TScalar>
101 ReadVector(const std::string & dataSetName);
102
103 void
104 SetupStreaming(H5::DataSpace * imageSpace, H5::DataSpace * slabSpace);
105
106 void
108
109 H5::H5File * m_H5File;
110 H5::DataSet * m_VoxelDataSet;
111};
112} // end namespace itk
113
114#endif // itkHDF5UltrasoundImageIO_h
virtual bool CanReadFile(const char *fileNameToRead) override
virtual void PrintSelf(std::ostream &os, Indent indent) const override
virtual void ReadImageInformation() override
virtual void WriteImageInformation() override
virtual bool CanWriteFile(const char *fileNameToWrite) override
void SetupStreaming(H5::DataSpace *imageSpace, H5::DataSpace *slabSpace)
std::vector< TScalar > ReadVector(const std::string &dataSetName)
virtual SizeType GetHeaderSize() const override
Returns the size of the header in the file.
virtual void Write(const void *buffer) override
virtual void Read(void *buffer) override
itk::intmax_t SizeType
Control indentation during Print() invocation.
Definition itkIndent.h:53
Provides a mechanism for storing a collection of arbitrary data types.
The common interface for MetaDataObject's.
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....