ITK  5.2.0
Insight Toolkit
itkGEAdwImageIO.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  * http://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 #ifndef itkGEAdwImageIO_h
33 #define itkGEAdwImageIO_h
34 #include "ITKIOGEExport.h"
35 
36 
37 #include "itkIPLCommonImageIO.h"
38 
39 namespace itk
40 {
50 class ITKIOGE_EXPORT GEAdwImageIO : public IPLCommonImageIO
51 {
52 public:
53  ITK_DISALLOW_COPY_AND_MOVE(GEAdwImageIO);
54 
56  using Self = GEAdwImageIO;
59 
61  itkNewMacro(Self);
62 
64  itkTypeMacro(GEAdwImageIO, Superclass);
65 
66  /*-------- This part of the interfaces deals with reading data. ----- */
67 
74  bool
75  CanReadFile(const char * FileNameToRead) override;
76 
77  /* * Set the spacing and dimension information for the set filename. */
78  // Implemented in superclass
79  // virtual void ReadImageInformation();
80 
81  /* * Get the type of the pixel. */
82  // Implemented in superclass
83  // virtual const std::type_info& GetPixelType() const;
84 
85  /* * Reads the data from disk into the memory buffer provided. */
86  // Implemented in superclass
87  // virtual void Read(void* buffer);
88 
89  /* * Compute the size (in bytes) of the components of a pixel. For
90  * example, and RGB pixel of unsigned char would have a
91  * component size of 1 byte. */
92  // Implemented in superclass
93  // virtual unsigned int GetComponentSize() const;
94 
95  /*-------- This part of the interfaces deals with writing data. ----- */
96 
97  /* * Determine if the file can be written with this ImageIO implementation.
98  * \param FileNameToWrite The name of the file to test for writing.
99  * \author Hans J. Johnson
100  * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite
101  * \return Returns true if this ImageIO can write the file specified.
102  */
103  // Implemented in superclass
104  // virtual bool CanWriteFile(const char * FileNameToWrite);
105 
106  /* * Set the spacing and dimension information for the set filename. */
107  // Implemented in superclass
108  // virtual void WriteImageInformation();
109 
110  /* * Writes the data to disk from the memory buffer provided. Make sure
111  * that the IORegions has been set properly. */
112  // Implemented in superclass
113  // virtual void Write(const void* buffer);
114 
115 protected:
116  GEAdwImageIO();
117  ~GEAdwImageIO() override;
118  // Implemented in superclass
119  // void PrintSelf(std::ostream& os, Indent indent) const;
120  GEImageHeader *
121  ReadHeader(const char * FileNameToRead) override;
122 
123 private:
125  {
127  GE_ADW_SU_ID_LEN = 4,
128 
130  GE_ADW_SU_PRODID_LEN = 13,
131 
133  GE_ADW_EX_SUID_LEN = 4,
134 
136  GE_ADW_EX_NO_LEN = 2,
137 
139  GE_ADW_EX_HOSPNAME_LEN = 33,
140 
142  GE_ADW_EX_MAGSTRENGTH_LEN = 4,
143 
145  GE_ADW_EX_PATID_LEN = 13,
146 
148  GE_ADW_EX_PATNAME_LEN = 25,
149 
151  GE_ADW_EX_PATAGE_LEN = 2,
152 
154  GE_ADW_EX_PATIAN_LEN = 2,
155 
157  GE_ADW_EX_PATSEX_LEN = 2,
158 
160  GE_ADW_EX_PATWEIGHT_LEN = 4,
161 
163  GE_ADW_EX_HIST_LEN = 61,
164 
166  GE_ADW_EX_DATETIME_LEN = 4,
167 
169  GE_ADW_EX_REFPHY_LEN = 33,
170 
172  GE_ADW_EX_DIAGRAD_LEN = 33,
173 
175  GE_ADW_EX_OP_LEN = 4,
176 
178  GE_ADW_EX_DESC_LEN = 23,
179 
181  GE_ADW_EX_TYP_LEN = 3,
182 
184  GE_ADW_EX_FORMAT_LEN = 2,
185 
187  GE_ADW_EX_SYSID_LEN = 9,
188 
194  GE_ADW_SE_SUID_LEN = 4,
195 
197  GE_ADW_SE_UNIQ_LEN = 2,
198 
200  GE_ADW_SE_EXNO_LEN = 2,
201 
203  GE_ADW_SE_NO_LEN = 2,
204 
206  GE_ADW_SE_DATETIME_LEN = 4,
207 
209  GE_ADW_SE_DESC_LEN = 30,
210 
212  GE_ADW_SE_TYP_LEN = 2,
213 
215  GE_ADW_SE_PLANE_LEN = 2,
216 
218  GE_ADW_SE_POSITION_LEN = 4,
219 
221  GE_ADW_SE_ENTRY_LEN = 4,
222 
224  GE_ADW_SE_ANREF_LEN = 3,
225 
227  GE_ADW_SE_CONTRAST_LEN = 2,
228 
231  GE_ADW_SE_START_RAS_LEN = 1,
232 
234  GE_ADW_SE_START_LOC_LEN = 4,
235 
238  GE_ADW_SE_END_RAS_LEN = 1,
239 
241  GE_ADW_SE_END_LOC_LEN = 4,
242 
245  GE_ADW_SE_NUMIMAGES_LEN = 4,
246 
252  GE_ADW_IM_SUID_LEN = 4,
253 
255  GE_ADW_IM_UNIQ_LEN = 2,
256 
258  GE_ADW_IM_EXNO_LEN = 2,
259 
261  GE_ADW_IM_SENO_LEN = 2,
262 
264  GE_ADW_IM_NO_LEN = 2,
265 
268  GE_ADW_IM_DATETIME_LEN = 4,
269 
272  GE_ADW_IM_ACTUAL_DT_LEN = 4,
273 
275  GE_ADW_IM_SCTIME_LEN = 4,
276 
278  GE_ADW_IM_SLTHICK_LEN = 4,
279 
282  GE_ADW_IM_IMATRIX_X_LEN = 2,
283 
286  GE_ADW_IM_IMATRIX_Y_LEN = 2,
287 
289  GE_ADW_IM_DFOV_LEN = 4,
290 
293  GE_ADW_IM_DFOV_RECT_LEN = 4,
294 
296  GE_ADW_IM_DIM_X_LEN = 4,
297 
299  GE_ADW_IM_DIM_Y_LEN = 4,
300 
302  GE_ADW_IM_PIXSIZE_X_LEN = 4,
303 
305  GE_ADW_IM_PIXSIZE_Y_LEN = 4,
306 
308  GE_ADW_IM_CONTMODE_LEN = 2,
309 
311  GE_ADW_IM_PLANE_LEN = 2,
312 
315  GE_ADW_IM_SCANSPACING_LEN = 4,
316 
318  GE_ADW_IM_LOC_RAS_LEN = 1,
319 
321  GE_ADW_IM_LOC_LEN = 4,
322 
325  GE_ADW_IM_ULHC_R_LEN = 4,
326 
329  GE_ADW_IM_ULHC_A_LEN = 4,
330 
333  GE_ADW_IM_ULHC_S_LEN = 4,
334 
337  GE_ADW_IM_URHC_R_LEN = 4,
338 
341  GE_ADW_IM_URHC_A_LEN = 4,
342 
345  GE_ADW_IM_URHC_S_LEN = 4,
346 
349  GE_ADW_IM_BRHC_R_LEN = 4,
350 
353  GE_ADW_IM_BRHC_A_LEN = 4,
354 
357  GE_ADW_IM_BRHC_S_LEN = 4,
358 
360  GE_ADW_IM_TR_LEN = 4,
361 
363  GE_ADW_IM_TI_LEN = 4,
364 
366  GE_ADW_IM_TE_LEN = 4,
367 
369  GE_ADW_IM_NUMECHO_LEN = 2,
370 
372  GE_ADW_IM_ECHONUM_LEN = 2,
373 
375  GE_ADW_IM_NEX_LEN = 4,
376 
378  GE_ADW_IM_CONTIG_LEN = 2,
379 
381  GE_ADW_IM_HRTRATE_LEN = 2,
382 
384  GE_ADW_IM_TDEL_LEN = 4,
385 
388  GE_ADW_IM_XMTGAIN_LEN = 2,
389 
392  GE_ADW_IM_MR_FLIP_LEN = 2,
393 
396  GE_ADW_IM_CPHASE_LEN = 2,
397 
399  GE_ADW_IM_SWAPPF_LEN = 2,
400 
402  GE_ADW_IM_OBPLANE_LEN = 4,
403 
405  GE_ADW_IM_XMTFREQ_LEN = 4,
406 
408  GE_ADW_IM_PRESCAN_R1_LEN = 2,
409 
411  GE_ADW_IM_PRESCAN_R2_LEN = 2,
412 
414  GE_ADW_IM_IMODE_LEN = 2,
415 
417  GE_ADW_IM_IOPT_LEN = 4,
418 
420  GE_ADW_IM_PSEQ_LEN = 2,
421 
423  GE_ADW_IM_PSDNAME_LEN = 33,
424 
426  GE_ADW_IM_CTYP_LEN = 2,
427 
429  GE_ADW_IM_CNAME_LEN = 17,
430 
433  GE_ADW_IM_SUPP_TECH_LEN = 2,
434 
436  GE_ADW_IM_VBW_LEN = 4,
437 
440  GE_ADW_IM_SLQUANT_LEN = 2,
441 
443  GE_ADW_IM_USER0_LEN = 4,
444 
446  GE_ADW_IM_USER1_LEN = 4,
447 
449  GE_ADW_IM_USER2_LEN = 4,
450 
452  GE_ADW_IM_USER3_LEN = 4,
453 
455  GE_ADW_IM_USER4_LEN = 4,
456 
458  GE_ADW_IM_USER5_LEN = 4,
459 
461  GE_ADW_IM_USER6_LEN = 4,
462 
464  GE_ADW_IM_USER7_LEN = 4,
465 
467  GE_ADW_IM_USER8_LEN = 4,
468 
470  GE_ADW_IM_USER9_LEN = 4,
471 
473  GE_ADW_IM_USER10_LEN = 4,
474 
476  GE_ADW_IM_USER11_LEN = 4,
477 
479  GE_ADW_IM_USER12_LEN = 4,
480 
482  GE_ADW_IM_USER13_LEN = 4,
483 
485  GE_ADW_IM_USER14_LEN = 4,
486 
488  GE_ADW_IM_USER15_LEN = 4,
489 
491  GE_ADW_IM_USER16_LEN = 4,
492 
494  GE_ADW_IM_USER17_LEN = 4,
495 
497  GE_ADW_IM_USER18_LEN = 4,
498 
500  GE_ADW_IM_USER19_LEN = 4,
501 
503  GE_ADW_IM_USER20_LEN = 4,
504 
506  GE_ADW_IM_USER21_LEN = 4,
507 
509  GE_ADW_IM_USER22_LEN = 4,
510 
512  GE_ADW_IM_USER23_LEN = 4,
513 
515  GE_ADW_IM_USER24_LEN = 4,
516 
518  GE_ADW_IM_SATBITS_LEN = 2,
519 
522  GE_ADW_IM_SCIC_LEN = 2,
523 
525  GE_ADW_IM_FLAX_LEN = 2,
526 
528  GE_ADW_IM_VENC_LEN = 2,
529 
531  GE_ADW_IM_THK_DISCLMR_LEN = 2,
532 
534  GE_ADW_IM_VAS_COLLAPSE_LEN = 2,
535 
537  GE_ADW_IM_X_AXIS_ROT_LEN = 4,
538 
540  GE_ADW_IM_Y_AXIS_ROT_LEN = 4,
541 
543  GE_ADW_IM_Z_AXIS_ROT_LEN = 4,
544 
546  GE_ADW_IM_ECHO_TRN_LEN = 2,
547 
549  GE_ADW_IM_FRAC_ECHO_LEN = 2,
550 
552  GE_ADW_IM_PREP_PULSE_LEN = 2,
553 
556  GE_ADW_IM_CPHASENUM_LEN = 2,
557 
559  GE_ADW_IM_VAR_ECHO_LEN = 2,
560 
562  GE_ADW_IM_FREQ_DIR_LEN = 2,
563 
565  GE_ADW_IM_VMODE_LEN = 2,
566 
569  GE_ADW_VARIABLE_HDR_LENGTH_LEN = 4,
570 
573  };
574 };
575 } // end namespace itk
576 
577 #endif // itkGEAdwImageIO_h
itk::GEAdwImageIO
Class that defines how to read GEAdw file format.
Definition: itkGEAdwImageIO.h:50
itkIPLCommonImageIO.h
This file was written as a modification to the itkMetaImageIO as a new method for reading in files fr...
itk::GEAdwImageIO::GE_ADW_DEFINES
GE_ADW_DEFINES
Definition: itkGEAdwImageIO.h:124
itk::SmartPointer< Self >
GEImageHeader
Definition: itkGEImageHeader.h:41
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::IPLCommonImageIO
Class that defines how to read GE4 file format.
Definition: itkIPLCommonImageIO.h:51
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62