ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkSiemensVisionImageIO.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 *=========================================================================*/
32
33#ifndef itkSiemensVisionImageIO_h
34#define itkSiemensVisionImageIO_h
35#include "ITKIOSiemensExport.h"
36
37
38#include "itkIPLCommonImageIO.h"
39
40namespace itk
41{
51class ITKIOSiemens_EXPORT SiemensVisionImageIO : public IPLCommonImageIO
52{
53public:
54 ITK_DISALLOW_COPY_AND_MOVE(SiemensVisionImageIO);
55
60
62 itkNewMacro(Self);
63
65 itkOverrideGetNameOfClassMacro(SiemensVisionImageIO);
66
67 /*-------- This part of the interfaces deals with reading data. ----- */
68
75 bool
76 CanReadFile(const char * FileNameToRead) override;
77
78 /* * Set the spacing and dimension information for the set filename. */
79 // Implemented in superclass
80 // virtual void ReadImageInformation();
81
82 /* * Get the type of the pixel. */
83 // Implemented in superclass
84 // virtual const std::type_info& GetPixelType() const;
85
86 /* * Reads the data from disk into the memory buffer provided. */
87 // Implemented in superclass
88 // virtual void Read(void* buffer);
89
90 /* * Compute the size (in bytes) of the components of a pixel. For
91 * example, and RGB pixel of unsigned char would have a
92 * component size of 1 byte. */
93 // Implemented in superclass
94 // virtual unsigned int GetComponentSize() const;
95
96 /*-------- This part of the interfaces deals with writing data. ----- */
97
98 /* * Determine if the file can be written with this ImageIO implementation.
99 * \param FileNameToWrite The name of the file to test for writing.
100 * \author Hans J. Johnson
101 * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite
102 * \return Returns true if this ImageIO can write the file specified.
103 */
104 // Implemented in superclass
105 // virtual bool CanWriteFile(const char * FileNameToWrite);
106
107 /* * Set the spacing and dimension information for the set filename. */
108 // Implemented in superclass
109 // virtual void WriteImageInformation();
110
111 /* * Writes the data to disk from the memory buffer provided. Make sure
112 * that the IORegions has been set properly. */
113 // Implemented in superclass
114 // virtual void Write(const void* buffer);
115
116protected:
119 // Implemented in superclass
120 // void PrintSelf(std::ostream& os, Indent indent) const;
122 ReadHeader(const char * FileNameToRead) override;
123
124private:
126 {
127 HDR_STUDY_YEAR = 0, // Study date year, u_int
129 HDR_STUDY_MONTH = 4, // Study date month, u_int
131 HDR_STUDY_DAY = 8, // Study date day, u_int
133 HDR_ACQ_YEAR = 12, // Acquisition date year, u_int
135 HDR_ACQ_MONTH = 16, // Acquisition date month, u_int
137 HDR_ACQ_DAY = 20, // Acquisition date day, u_int
139 HDR_IMAGE_YEAR = 24, // Image date year, u_int
141 HDR_IMAGE_MONTH = 28, // Image date month, u_int
143 HDR_IMAGE_DAY = 32, // Image date day, u_int
145 HDR_STUDY_HOUR = 36, // Study time hour, u_int
147 HDR_STUDY_MIN = 40, // Study time minute, u_int
149 HDR_STUDY_SEC = 44, // Study time second, u_int
151 HDR_ACQ_HOUR = 52, // Acquisition time second, u_int
153 HDR_ACQ_MIN = 56, // Acquisition time second, u_int
155 HDR_ACQ_SEC = 60, // Acquisition time second, u_int
157 HDR_IMAGE_HOUR = 68, // Image Creation time second, u_int
159 HDR_IMAGE_MIN = 72, // Image Creation time second, u_int
161 HDR_IMAGE_SEC = 76, // Image Creation time second, u_int
163 HDR_MANUFAC = 96, // Scanner Manufacturer, char
165 HDR_INSTUTE_NAME = 105, // Institution Name, char
167 HDR_ANNOTATION = 186, // Annotation, char
169 HDR_MODEL_NAME = 281, // Scanner Model Name, char
171 HDR_LMOVE_YEAR = 412, // Date of Last Image Move - year, u_int
173 HDR_LMOVE_MONTH = 416, // Date of Last Image Move - month, u_int
175 HDR_LMOVE_DAY = 420, // Date of Last Image Move - day, u_int
177 HDR_LMOVE_HOUR = 424, // Date of Last Image Move - hour, u_int
179 HDR_LMOVE_MIN = 428, // Date of Last Image Move - minute, u_int
181 HDR_LMOVE_SEC = 432, // Date of Last Image Move - second, u_int
183 HDR_PAT_NAME = 768, // Patient Name, char
185 HDR_PAT_ID = 795, // Patient ID Number, char
187 HDR_DOB_YEAR = 808, // Date of Birth year, u_int
189 HDR_DOB_MONTH = 812, // Date of Birth month, u_int
191 HDR_DOB_DAY = 816, // Date of Birth day, u_int
193 HDR_PAT_AGE = 851, // Patient Age, char
195 HDR_AGE_UNIT = 854, // Patient Age Unit, char
197 HDR_REG_YEAR = 1052, // Registration Date year, u_int
199 HDR_REG_MONTH = 1056, // Registration Date month, u_int
201 HDR_REG_DAY = 1060, // Registration Date day, u_int
203 HDR_REG_HOUR = 1064, // Registration Time hour, u_int
205 HDR_REG_MIN = 1068, // Registration Time minute, u_int
207 HDR_REG_SEC = 1072, // Registration Time second, u_int
209 HDR_SLICE_THCK = 1544, // Slice thickness, double
211 HDR_TR = 1560, // TR, double
213 HDR_TE = 1568, // TE, double
215 HDR_FREQ = 1592, // Center Frequency, double
217 HDR_STATION = 1639, // Station Name, char
219 HDR_CAL_YEAR = 1712, // Calibration Date - year, u_int
221 HDR_CAL_MONTH = 1716, // Calibration Date - month, u_int
223 HDR_CAL_DAY = 1720, // Calibration Date - day, u_int
225 HDR_CAL_HOUR = 1724, // Calibration Time - hour, u_int
227 HDR_CAL_MIN = 1728, // Calibration Time - minute, u_int
229 HDR_CAL_SEC = 1732, // Calibration Time - second, u_int
231 HDR_COIL = 1767, // Receive Coil, char
233 HDR_IMAGE_NUC = 1828, // Imaged Nucleus, char
235 HDR_FLIP_ANGLE = 2112, // Flip Angle, double
237 HDR_FIELD = 2560, // Field Strength, double
239 HDR_DISPLAY_SIZE = 2864, // Displayed Matrix Size, u_int
241 HDR_SEQPROG_NAME = 2944, // Pulse Sequence Program Name, cha
243 HDR_WKC_NAME = 3009, // Pulse Sequence Name, char
245 HDR_AUTHOR = 3074, // Pulse Sequence Author, char
247 HDR_SEQUENCE_TYPE = 3083, // Pulse Sequence Type, char
249 HDR_FOV_ROW = 3744, // Row FOV, double
251 HDR_FOV_COLUMN = 3752, // Column FOV, double
253 HDR_CENTER_X = 3768, // X Center Point, double
255 HDR_CENTER_Y = 3776, // Y Center Point, double
257 HDR_CENTER_Z = 3784, // Z Center Point, double
259 HDR_NORMV_X = 3792, // Normal Vector X, double
261 HDR_NORMV_Y = 3800, // Normal Vector Y, double
263 HDR_NORMV_Z = 3808, // Normal Vector Z, double
265 HDR_DIST_ISO = 3816, // Distance from Isocenter, double
267 HDR_ROWV_X = 3832, // Row vector X, double
269 HDR_ROWV_Y = 3840, // Row vector Y, double
271 HDR_ROWV_Z = 3848, // Row vector Z, double
273 HDR_COLMNV_X = 3856, // Column vector X, double
275 HDR_COLMNV_Y = 3864, // Column vector Y, double
277 HDR_COLMNV_Z = 3872, // Column vector Z, double
279 HDR_ORNT_SET1X = 3880, // Orientation Set 1 - X, char
281 HDR_ORNT_SET1Y = 3884, // Orientation Set 1 - Y, char
283 HDR_ORNT_SET1Z = 3888, // Orientation Set 1 - Z, char
285 HDR_ORNT_SET2X = 3892, // Orientation Set 2 - X, char
287 HDR_ORNT_SET2Y = 3896, // Orientation Set 2 - Y, char
289 HDR_ORNT_SET2Z = 3900, // Orientation Set 2 - Z, char
291 HDR_PROTOCOL_NAME = 2944, // Pulse Sequence Name, char
293 HDR_PIXELSIZE_ROW = 5000, // Row Pixel Size, double
295 HDR_PIXELSIZE_CLMN = 5008, // Column Pixel Size, double
297 TEXT_PAT_ID = 5504, // Text Patient ID, char
299 TEXT_PAT_SEX = 5517, // Text Patient Sex, char
301 TEXT_PAT_AGE = 5518, // Text Patient Age, char
303 TEXT_AGE_UNIT = 5521, // Text Patient Age Unit (Y=year), char
305 TEXT_PAT_POS = 5529, // Text Patient Position, char
307 TEXT_IMG_FLAG = 5541, // Text Image Flag (IMAGE=image), char
309 TEXT_IMG_NUMBER = 5546, // Text Image Number, char
311 TEXT_IMG_DAY = 5559, // Text Date - Day, char
313 TEXT_IMG_MONTH = 5562, // Text Date - Month, char
315 TEXT_IMG_YEAR = 5566, // Text Date - Year, char
317 TEXT_IMG_HOUR = 5571, // Text Time - hour, char
319 TEXT_IMG_MIN = 5574, // Text Time - minute, char
321 TEXT_ACQ_FLAG = 5577, // Text Acq. Time Flag (TA=time of acq), char
323 TEXT_ACQ_MIN = 5583, // Text Acq Time - minute, char
325 TEXT_ACQ_SEC = 5586, // Text Acq Time - second, char
327 TEXT_ANNOTATION = 5601, // Text Annotation, char
329 TEXT_ORGANIZATION = 5655, // Text Organization, char
331 TEXT_STATION = 5682, // Text Station Name, char
333 TEXT_ACQ_MTRX_PHASE = 5695, // Acq. Matrix Phase Axis, char
335 TEXT_ACQ_PHASE_DIR = 5698, // Acq. phase direction (h=hor, v=vert), char
337 TEXT_ACQ_MTRX_FREQ = 5700, // Acq. matrix Freq Axis, char
339 TEXT_ACQ_MTRX_FREQO = 5703, // Acq freq (o=o " "=blank), char
341 TEXT_ACQ_MTRX_FREQS = 5704, // Acq freq (s=s " "=blank), char
343 TEXT_SEQUENCE = 5706, // Sequence Type, char
345 TEXT_FLIP_ANGLE = 5714, // Flip Angle, char
347 TEXT_SCAN_FLAG = 5718, // Scan flag ("SCAN"), char */
349 TEXT_SCANA_NUM = 5723, // Scan Number A, char
351 TEXT_SCANB_NUM = 5726, // Scan Number B, char
353 TEXT_TR_FLAG = 5730, // TR flag ("TR"), char
355 TEXT_TR = 5734, // TR, char
357 TEXT_TE_FLAG = 5742, // TE flag ("TE"), char
359 TEXT_TE = 5746, // TE, char
361 TEXT_ECHO_NUM = 5752, // Echo number, char
363 TEXT_THCK_FLAG = 5790, // SLice thickness flag ("SL"), char
365 TEXT_SLICE_THCK = 5794, // Slice thickness
367 TEXT_POS_FLAG = 5802, // Slice position flag ("SP"), char
369 TEXT_SLICE_POS = 5806, // Slice position, char
371 TEXT_ANGLE_FLAG1 = 5814, // Angle flag 1 ("Sag","Cor",or,"Tra"), char
373 TEXT_ANGLE_FLAG2 = 5817, // Angle flag 2 ("<", or ">"), char
375 TEXT_ANGLE_FLAG3 = 5818, // Angle flag 3 ("Sag","Cor",or,"Tra"), char
377 TEXT_ANGLE = 5821, // Angle, char
379 TEXT_FOV_FLAG = 5838, // FOV flag ("FOV"), char
381 TEXT_FOVH = 5842, // Horizontal FOV, char
383 TEXT_FOVV = 5846, // Vertical FOV, char
385 TEXT_TABLEPOS_FLAG = 5874, // Table Position flag ("TP"), char
387 TEXT_TABLE_POS = 5878, // Table position
389 TEXT_STUDY_FLAG = 5938, // Study flag ("STUDY"), char
391 TEXT_STUDY_NUM = 5943, // Study number, char
393 TEXT_DOB_DAY = 5956, // Date of Birth - day, char
395 TEXT_DOB_MONTH = 5959, // Date of Birth - month, char
397 TEXT_DOB_YEAR = 5963, // Date of Birth - year, char
399 TEXT_STUDY_FLAG2 = 5992, // Study flag 2 ("STU"), char
401 TEXT_IMAGE_FLAG2 = 5996, // Image flag 2 ("IMA"), char
403 TEXT_STUDY_NUM2 = 5999, // Study number 2, char
405 TEXT_IMAGE_NUM2 = 6002, // Image number 2, char
407 TEXT_IMAGE_NUM3 = 6013, // Image number 3, char
409 TEXT_MODEL_NAME = 6031, // Model Name, char
411 TEXT_PAT_NAME = 6058, // Patient Name, char
413 TEXT_START_HOUR = 6085, // Scan start time - hour, char
415 TEXT_START_MIN = 6088, // Scan start time - minute, char
417 TEXT_START_SEC = 6091, // Scan start time - second, char
419 HDR_TOTAL_LENGTH = 6144 // Total length of Siemens Header
420 };
421};
422} // end namespace itk
423
424#endif // itkSiemensVisionImageIO_h
~SiemensVisionImageIO() override
GEImageHeader * ReadHeader(const char *FileNameToRead) override
bool CanReadFile(const char *FileNameToRead) override
Implements transparent reference counting.
This file was written as a modification to the itkMetaImageIO as a new method for reading in files fr...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....