Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkRawReader.h

00001 /*=========================================================================
00002 
00003   Program:   3DMed
00004   Date:      $Date: 2014-02-25 18:30:00 +0800 $
00005   Version:   $Version: 4.6.0 $
00006   Copyright: MIPG, Institute of Automation, Chinese Academy of Sciences
00007 
00008 =========================================================================*/
00009 
00010 
00011 #ifndef __mitkRawReader_h
00012 #define __mitkRawReader_h
00013 
00014 #include "mitkVolumeReader.h"
00015 
00041 class MITK_COMMON_API mitkRawReader : public mitkVolumeReader
00042 {
00043 public:
00044     MITK_TYPE(mitkRawReader,mitkVolumeReader)
00045     
00046     virtual void PrintSelf(ostream& os);
00047     
00051     mitkRawReader();    
00052        
00057     void SetWidth(int w){ m_Width = w;}
00058     
00063     void SetHeight(int h){ m_Height = h;}
00064     
00069     void SetImageNum(int n){ m_ImageNum = n;}
00070     
00075     void SetSpacingX(float px){ m_Spacings[0] = px; }
00076 
00081     void SetSpacingY(float py){ m_Spacings[1] = py; }
00082 
00087     void SetSpacingZ(float pz){ m_Spacings[2] = pz; }
00088 
00096     void SetChannelNum(int n){ m_ChNum = n; }
00097 
00106     void SetTitleBytes(int n) { m_TitleBytes = n; }
00107     
00112     void SetEndian(bool isBig = false) { m_IsBigEndian = isBig; }
00113 
00117     void SetBigEndian(bool isBig = true) { this->SetEndian(isBig); }
00118 
00122     void SetLittleEndian(bool isBig = false) { this->SetEndian(isBig); }
00123 
00132     void SetPlanarCfg(bool isColorByPlane) { m_IsColorByPlane = isColorByPlane; }
00133 
00149     void SetDataType(int dataType){ m_DataType = dataType; }
00150 
00154     void SetDataTypeToFloat(){this->SetDataType(MITK_FLOAT);}
00155 
00159     void SetDataTypeToDouble(){this->SetDataType(MITK_DOUBLE);}
00160 
00164     void SetDataTypeToInt(){this->SetDataType(MITK_INT);}
00165 
00169     void SetDataTypeToUnsignedInt()
00170     {this->SetDataType(MITK_UNSIGNED_INT);}
00171 
00175     void SetDataTypeToLong(){this->SetDataType(MITK_LONG);}
00176 
00180     void SetDataTypeToUnsignedLong()
00181     {this->SetDataType(MITK_UNSIGNED_LONG);}
00182 
00186     void SetDataTypeToShort(){this->SetDataType(MITK_SHORT);}
00187 
00191     void SetDataTypeToUnsignedShort()
00192     {this->SetDataType(MITK_UNSIGNED_SHORT);}
00193 
00197     void SetDataTypeToUnsignedChar()
00198     {this->SetDataType(MITK_UNSIGNED_CHAR);}
00199     
00203     void SetDataTypeToChar()
00204     {this->SetDataType(MITK_CHAR);}
00205 
00206 protected:
00207     virtual ~mitkRawReader();   
00208     
00209     // Overriding.
00210     // Execute the reading operation.
00211     virtual bool Execute();
00212     
00213     bool  m_IsBigEndian;
00214     bool  m_IsColorByPlane;
00215     int   m_TitleBytes;
00216     int   m_Width;
00217     int   m_Height;
00218     int   m_ImageNum;
00219     int   m_ChNum;
00220     int   m_DataType;
00221     float m_Spacings[3];
00222     
00223 
00224 private:
00225     mitkRawReader(const mitkRawReader&);
00226     void operator=(const mitkRawReader&);
00227     
00228 };
00229 
00230 
00231 //#define DEFINED_mitkRawReader
00232 
00233 
00234 
00235 #endif
00236 
00237 

Generated on Tue Feb 25 15:00:37 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3