ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkGEAdwImageIO.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00032 #ifndef __itkGEAdwImageIO_h
00033 #define __itkGEAdwImageIO_h
00034 
00035 
00036 #include "itkIPLCommonImageIO.h"
00037 
00038 namespace itk
00039 {
00048 class ITK_EXPORT GEAdwImageIO:public IPLCommonImageIO
00049 {
00050 public:
00052   typedef GEAdwImageIO         Self;
00053   typedef IPLCommonImageIO     Superclass;
00054   typedef SmartPointer< Self > Pointer;
00055 
00057   itkNewMacro(Self);
00058 
00060   itkTypeMacro(GEAdwImageIO, Superclass);
00061 
00062   /*-------- This part of the interfaces deals with reading data. ----- */
00063 
00070   virtual bool CanReadFile(const char *FileNameToRead);
00071 
00072   /* * Set the spacing and dimension information for the set filename. */
00073   // Implemented in superclass
00074   //      virtual void ReadImageInformation();
00075 
00076   /* * Get the type of the pixel.  */
00077   // Implemented in superclass
00078   //      virtual const std::type_info& GetPixelType() const;
00079 
00080   /* * Reads the data from disk into the memory buffer provided. */
00081   // Implemented in superclass
00082   //      virtual void Read(void* buffer);
00083 
00084   /* * Compute the size (in bytes) of the components of a pixel. For
00085        * example, and RGB pixel of unsigned char would have a
00086        * component size of 1 byte. */
00087   // Implemented in superclass
00088   //      virtual unsigned int GetComponentSize() const;
00089 
00090   /*-------- This part of the interfaces deals with writing data. ----- */
00091 
00092   /* * Determine if the file can be written with this ImageIO implementation.
00093        * \param FileNameToWrite The name of the file to test for writing.
00094        * \author Hans J. Johnson
00095        * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite
00096        * \return Returns true if this ImageIO can write the file specified.
00097        */
00098   // Implemented in superclass
00099   //      virtual bool CanWriteFile(const char * FileNameToWrite);
00100 
00101   /* * Set the spacing and dimension information for the set filename. */
00102   // Implemented in superclass
00103   //      virtual void WriteImageInformation();
00104 
00105   /* * Writes the data to disk from the memory buffer provided. Make sure
00106        * that the IORegions has been set properly. */
00107   // Implemented in superclass
00108   //      virtual void Write(const void* buffer);
00109 protected:
00110   GEAdwImageIO();
00111   ~GEAdwImageIO();
00112   // Implemented in superclass
00113   //      void PrintSelf(std::ostream& os, Indent indent) const;
00114   virtual GEImageHeader * ReadHeader(const char *FileNameToRead);
00115 
00116 private:
00117   GEAdwImageIO(const Self &);   //purposely not implemented
00118   void operator=(const Self &); //purposely not implemented
00119 
00120   enum GE_ADW_DEFINES {
00122     GE_ADW_SU_ID_LEN = 4,
00123 
00125     GE_ADW_SU_PRODID_LEN = 13,
00126 
00128     GE_ADW_EX_SUID_LEN = 4,
00129 
00131     GE_ADW_EX_NO_LEN = 2,
00132 
00134     GE_ADW_EX_HOSPNAME_LEN = 33,
00135 
00137     GE_ADW_EX_MAGSTRENGTH_LEN = 4,
00138 
00140     GE_ADW_EX_PATID_LEN = 13,
00141 
00143     GE_ADW_EX_PATNAME_LEN = 25,
00144 
00146     GE_ADW_EX_PATAGE_LEN = 2,
00147 
00149     GE_ADW_EX_PATIAN_LEN = 2,
00150 
00152     GE_ADW_EX_PATSEX_LEN = 2,
00153 
00155     GE_ADW_EX_PATWEIGHT_LEN = 4,
00156 
00158     GE_ADW_EX_HIST_LEN = 61,
00159 
00161     GE_ADW_EX_DATETIME_LEN = 4,
00162 
00164     GE_ADW_EX_REFPHY_LEN = 33,
00165 
00167     GE_ADW_EX_DIAGRAD_LEN = 33,
00168 
00170     GE_ADW_EX_OP_LEN = 4,
00171 
00173     GE_ADW_EX_DESC_LEN = 23,
00174 
00176     GE_ADW_EX_TYP_LEN = 3,
00177 
00179     GE_ADW_EX_FORMAT_LEN = 2,
00180 
00182     GE_ADW_EX_SYSID_LEN = 9,
00183 
00189     GE_ADW_SE_SUID_LEN = 4,
00190 
00192     GE_ADW_SE_UNIQ_LEN = 2,
00193 
00195     GE_ADW_SE_EXNO_LEN = 2,
00196 
00198     GE_ADW_SE_NO_LEN = 2,
00199 
00201     GE_ADW_SE_DATETIME_LEN = 4,
00202 
00204     GE_ADW_SE_DESC_LEN = 30,
00205 
00207     GE_ADW_SE_TYP_LEN = 2,
00208 
00210     GE_ADW_SE_PLANE_LEN = 2,
00211 
00213     GE_ADW_SE_POSITION_LEN = 4,
00214 
00216     GE_ADW_SE_ENTRY_LEN = 4,
00217 
00219     GE_ADW_SE_ANREF_LEN = 3,
00220 
00222     GE_ADW_SE_CONTRAST_LEN = 2,
00223 
00226     GE_ADW_SE_START_RAS_LEN = 1,
00227 
00229     GE_ADW_SE_START_LOC_LEN = 4,
00230 
00233     GE_ADW_SE_END_RAS_LEN = 1,
00234 
00236     GE_ADW_SE_END_LOC_LEN = 4,
00237 
00240     GE_ADW_SE_NUMIMAGES_LEN = 4,
00241 
00247     GE_ADW_IM_SUID_LEN = 4,
00248 
00250     GE_ADW_IM_UNIQ_LEN = 2,
00251 
00253     GE_ADW_IM_EXNO_LEN = 2,
00254 
00256     GE_ADW_IM_SENO_LEN = 2,
00257 
00259     GE_ADW_IM_NO_LEN = 2,
00260 
00263     GE_ADW_IM_DATETIME_LEN = 4,
00264 
00267     GE_ADW_IM_ACTUAL_DT_LEN = 4,
00268 
00270     GE_ADW_IM_SCTIME_LEN = 4,
00271 
00273     GE_ADW_IM_SLTHICK_LEN = 4,
00274 
00277     GE_ADW_IM_IMATRIX_X_LEN = 2,
00278 
00281     GE_ADW_IM_IMATRIX_Y_LEN = 2,
00282 
00284     GE_ADW_IM_DFOV_LEN = 4,
00285 
00288     GE_ADW_IM_DFOV_RECT_LEN = 4,
00289 
00291     GE_ADW_IM_DIM_X_LEN = 4,
00292 
00294     GE_ADW_IM_DIM_Y_LEN = 4,
00295 
00297     GE_ADW_IM_PIXSIZE_X_LEN = 4,
00298 
00300     GE_ADW_IM_PIXSIZE_Y_LEN = 4,
00301 
00303     GE_ADW_IM_CONTMODE_LEN = 2,
00304 
00306     GE_ADW_IM_PLANE_LEN = 2,
00307 
00310     GE_ADW_IM_SCANSPACING_LEN = 4,
00311 
00313     GE_ADW_IM_LOC_RAS_LEN = 1,
00314 
00316     GE_ADW_IM_LOC_LEN = 4,
00317 
00320     GE_ADW_IM_ULHC_R_LEN = 4,
00321 
00324     GE_ADW_IM_ULHC_A_LEN = 4,
00325 
00328     GE_ADW_IM_ULHC_S_LEN = 4,
00329 
00332     GE_ADW_IM_URHC_R_LEN = 4,
00333 
00336     GE_ADW_IM_URHC_A_LEN = 4,
00337 
00340     GE_ADW_IM_URHC_S_LEN = 4,
00341 
00344     GE_ADW_IM_BRHC_R_LEN = 4,
00345 
00348     GE_ADW_IM_BRHC_A_LEN = 4,
00349 
00352     GE_ADW_IM_BRHC_S_LEN = 4,
00353 
00355     GE_ADW_IM_TR_LEN = 4,
00356 
00358     GE_ADW_IM_TI_LEN = 4,
00359 
00361     GE_ADW_IM_TE_LEN = 4,
00362 
00364     GE_ADW_IM_NUMECHO_LEN = 2,
00365 
00367     GE_ADW_IM_ECHONUM_LEN = 2,
00368 
00370     GE_ADW_IM_NEX_LEN = 4,
00371 
00373     GE_ADW_IM_CONTIG_LEN = 2,
00374 
00376     GE_ADW_IM_HRTRATE_LEN = 2,
00377 
00379     GE_ADW_IM_TDEL_LEN = 4,
00380 
00383     GE_ADW_IM_XMTGAIN_LEN = 2,
00384 
00387     GE_ADW_IM_MR_FLIP_LEN = 2,
00388 
00391     GE_ADW_IM_CPHASE_LEN = 2,
00392 
00394     GE_ADW_IM_SWAPPF_LEN = 2,
00395 
00397     GE_ADW_IM_OBPLANE_LEN = 4,
00398 
00400     GE_ADW_IM_XMTFREQ_LEN = 4,
00401 
00403     GE_ADW_IM_PRESCAN_R1_LEN = 2,
00404 
00406     GE_ADW_IM_PRESCAN_R2_LEN = 2,
00407 
00409     GE_ADW_IM_IMODE_LEN = 2,
00410 
00412     GE_ADW_IM_IOPT_LEN = 4,
00413 
00415     GE_ADW_IM_PSEQ_LEN = 2,
00416 
00418     GE_ADW_IM_PSDNAME_LEN = 33,
00419 
00421     GE_ADW_IM_CTYP_LEN = 2,
00422 
00424     GE_ADW_IM_CNAME_LEN = 17,
00425 
00428     GE_ADW_IM_SUPP_TECH_LEN = 2,
00429 
00431     GE_ADW_IM_VBW_LEN = 4,
00432 
00435     GE_ADW_IM_SLQUANT_LEN = 2,
00436 
00438     GE_ADW_IM_USER0_LEN = 4,
00439 
00441     GE_ADW_IM_USER1_LEN = 4,
00442 
00444     GE_ADW_IM_USER2_LEN = 4,
00445 
00447     GE_ADW_IM_USER3_LEN = 4,
00448 
00450     GE_ADW_IM_USER4_LEN = 4,
00451 
00453     GE_ADW_IM_USER5_LEN = 4,
00454 
00456     GE_ADW_IM_USER6_LEN = 4,
00457 
00459     GE_ADW_IM_USER7_LEN = 4,
00460 
00462     GE_ADW_IM_USER8_LEN = 4,
00463 
00465     GE_ADW_IM_USER9_LEN = 4,
00466 
00468     GE_ADW_IM_USER10_LEN = 4,
00469 
00471     GE_ADW_IM_USER11_LEN = 4,
00472 
00474     GE_ADW_IM_USER12_LEN = 4,
00475 
00477     GE_ADW_IM_USER13_LEN = 4,
00478 
00480     GE_ADW_IM_USER14_LEN = 4,
00481 
00483     GE_ADW_IM_USER15_LEN = 4,
00484 
00486     GE_ADW_IM_USER16_LEN = 4,
00487 
00489     GE_ADW_IM_USER17_LEN = 4,
00490 
00492     GE_ADW_IM_USER18_LEN = 4,
00493 
00495     GE_ADW_IM_USER19_LEN = 4,
00496 
00498     GE_ADW_IM_USER20_LEN = 4,
00499 
00501     GE_ADW_IM_USER21_LEN = 4,
00502 
00504     GE_ADW_IM_USER22_LEN = 4,
00505 
00507     GE_ADW_IM_USER23_LEN = 4,
00508 
00510     GE_ADW_IM_USER24_LEN = 4,
00511 
00513     GE_ADW_IM_SATBITS_LEN = 2,
00514 
00517     GE_ADW_IM_SCIC_LEN = 2,
00518 
00520     GE_ADW_IM_FLAX_LEN = 2,
00521 
00523     GE_ADW_IM_VENC_LEN = 2,
00524 
00526     GE_ADW_IM_THK_DISCLMR_LEN = 2,
00527 
00529     GE_ADW_IM_VAS_COLLAPSE_LEN = 2,
00530 
00532     GE_ADW_IM_X_AXIS_ROT_LEN = 4,
00533 
00535     GE_ADW_IM_Y_AXIS_ROT_LEN = 4,
00536 
00538     GE_ADW_IM_Z_AXIS_ROT_LEN = 4,
00539 
00541     GE_ADW_IM_ECHO_TRN_LEN = 2,
00542 
00544     GE_ADW_IM_FRAC_ECHO_LEN = 2,
00545 
00547     GE_ADW_IM_PREP_PULSE_LEN = 2,
00548 
00551     GE_ADW_IM_CPHASENUM_LEN = 2,
00552 
00554     GE_ADW_IM_VAR_ECHO_LEN = 2,
00555 
00557     GE_ADW_IM_FREQ_DIR_LEN = 2,
00558 
00560     GE_ADW_IM_VMODE_LEN = 2,
00561 
00564     GE_ADW_VARIABLE_HDR_LENGTH_LEN = 4,
00565 
00568     };
00569 };
00570 } // end namespace itk
00571 
00572 #endif // __itkAnalyzeImageIO_h
00573