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

mitkCommon/Include/mitkRawFilesReader.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 __mitkRawFilesReader_h
00012 #define __mitkRawFilesReader_h
00013 
00014 #include "mitkVolumeReader.h"
00015 
00043 class MITK_COMMON_API mitkRawFilesReader : public mitkVolumeReader
00044 {
00045 public:
00046     MITK_TYPE(mitkRawFilesReader, mitkVolumeReader)
00047     
00048     virtual void PrintSelf(ostream& os);
00049     
00053     mitkRawFilesReader();    
00054        
00059     void SetWidth(int w) { m_Width = w; }
00060     
00065     void SetHeight(int h) { m_Height = h; }
00066     
00071     void SetSpacingX(float px) { m_Spacings[0] = px; }
00072 
00077     void SetSpacingY(float py) { m_Spacings[1] = py; }
00078 
00083     void SetSpacingZ(float pz) { m_Spacings[2] = pz; }
00084 
00092     void SetChannelNum(int n) { m_ChNum = n; }
00093 
00102     void SetTitleBytes(int n) { m_TitleBytes = n; }
00103     
00108     void SetEndian(bool isBig = false) { m_IsBigEndian = isBig; }
00109 
00113     void SetBigEndian(bool isBig = true) { this->SetEndian(isBig); }
00114 
00118     void SetLittleEndian(bool isBig = false) { this->SetEndian(isBig); }
00119 
00128     void SetPlanarCfg(bool isColorByPlane) { m_IsColorByPlane = isColorByPlane; }
00129 
00145     void SetDataType(int dataType) { m_DataType = dataType; }
00146 
00150     void SetDataTypeToFloat(){this->SetDataType(MITK_FLOAT);}
00151 
00155     void SetDataTypeToDouble(){this->SetDataType(MITK_DOUBLE);}
00156 
00160     void SetDataTypeToInt(){this->SetDataType(MITK_INT);}
00161 
00165     void SetDataTypeToUnsignedInt()
00166     {this->SetDataType(MITK_UNSIGNED_INT);}
00167 
00171     void SetDataTypeToLong(){this->SetDataType(MITK_LONG);}
00172 
00176     void SetDataTypeToUnsignedLong()
00177     {this->SetDataType(MITK_UNSIGNED_LONG);}
00178 
00182     void SetDataTypeToShort(){this->SetDataType(MITK_SHORT);}
00183 
00187     void SetDataTypeToUnsignedShort()
00188     {this->SetDataType(MITK_UNSIGNED_SHORT);}
00189 
00193     void SetDataTypeToUnsignedChar()
00194     {this->SetDataType(MITK_UNSIGNED_CHAR);}
00195     
00199     void SetDataTypeToChar()
00200     {this->SetDataType(MITK_CHAR);}
00201 
00202 protected:
00203     virtual ~mitkRawFilesReader();  
00204     
00205     // Overriding.
00206     // Execute the reading operation.
00207     virtual bool Execute();
00208     
00209     bool  m_IsBigEndian;
00210     bool  m_IsColorByPlane;
00211     int   m_TitleBytes;
00212     int   m_Width;
00213     int   m_Height;
00214     int   m_ChNum;
00215     int   m_DataType;
00216     float m_Spacings[3];
00217 
00218 private:
00219     mitkRawFilesReader(const mitkRawFilesReader&);
00220     void operator=(const mitkRawFilesReader&);
00221     
00222 };
00223 
00224 
00225 //#define DEFINED_mitkRawFilesReader
00226  
00227 
00228 
00229 #endif
00230 
00231 

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