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

mitkConeBeamRealTimePD.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 __mitkConeBeamRealTimePD_h
00012 #define __mitkConeBeamRealTimePD_h
00013 
00014 #include "mitkConeBeamPD.h"
00015 #include "mitkICVolume.h"
00016 #include "mitkRawReader.h"
00017 #include "mitkRCPtr.h"
00018 #include <string>
00019 #include <windows.h>
00020 using std::string;
00021 using std::ifstream;
00026 
00028 //      m_ConeData = new mitkConeBeamRealTimePD ;
00029 //      m_ConeData->SetXrayNumX(width);
00030 //      m_ConeData->SetXrayNumZ(height);
00031 //      m_ConeData->SetAngleNum(projectionView);
00032             
00033 //      m_ConeData->SetDataType(MITK_FLOAT);
00034 //      m_ConeData->SetBlockSize(EachBlockSizeConeBeamlineEdit->text().toInt());
00035 //      m_ConeData->SetIsOneFile(false);
00036 //      m_ConeData->SetFilePostfixNum(4);
00037 //      m_ConeData->SetRecycleNum(8);
00038 //      m_ConeData->SetFileName(filename.c_str());
00039 
00040 class MITK_RECONSTRUCTION_API mitkConeBeamRealTimePD : public mitkConeBeamPD  
00041 {
00042 public:
00043     MITK_TYPE(mitkConeBeamRealTimePD,mitkConeBeamPD)
00044     
00045     virtual void PrintSelf(ostream& os);
00046     
00047     mitkConeBeamRealTimePD();
00048 
00054     virtual unsigned long long GetActualMemorySize() const ;
00055 
00059     virtual void ShallowCopy(mitkDataObject *src);
00060 
00064     virtual void DeepCopy(mitkDataObject *src); 
00065 
00070     void SetBlockSize(int m){m_BlockSize = m; totalBlockNum = this->GetFrameNum()/m;}
00071 
00075     bool SetFileName(const char *m);
00076 
00077 
00081     void SetIsOneFile(bool onefile) {IsOneFile = onefile;}
00082 
00086     void SetFilePostfixNum(int m) {fix = m;}
00087 
00091     //virtual void const* GetAngleSliceForRead(int sliceIdx);
00092     virtual void const* GetFrameForRead(int frameIdx);
00093 
00097 //  virtual void* GetAngleSliceForWrite(int sliceIdx) {return NULL;}
00098     virtual void* GetFrameForWrite(int frameIdx){return NULL;};
00102     //virtual void* GetAngleSliceForReadWrite(int sliceIdx);
00103     
00104     virtual void* GetFrameForReadWrite(int frameIdx) ;
00108     int GetRecycleNum() const {return recycleNum;  }
00109 
00113     void SetRecycleNum(int m)  {recycleNum = m;  }
00114 
00115     virtual bool Allocate();
00116 
00117     virtual void Initialize();  
00118 
00119     void SetFileBeginName(int m)  {beginName = m;}
00120 
00121 protected:
00122     void ErrorReport(const char *m);
00123     static unsigned __stdcall ReadData( void* para);
00124     virtual ~mitkConeBeamRealTimePD(); 
00125 
00126 private:
00127     bool IsOneFile;
00128     FILE *fp;
00129     int m_BlockSize;
00130 //  int gpuBlockNum;
00131     int recycleNum;
00132     int totalBlockNum;
00133     int mBlockHead;
00134     int beginName;
00135     int mBlockBytes;
00136     int fix;
00137     bool isfileNameFixLength;
00138     mitkRawReader *reader;
00139     string filename;
00140     string savedFn;
00141     mitkRCPtr<mitkVolume> m_Data1;
00142     mitkRCPtr<mitkVolume> m_Data2;
00143     int beUsing;
00144     const int maxEffectBlock;
00145     HANDLE readDataThread;
00146     unsigned readDataThreadID;
00147     HANDLE readyUse;
00148     HANDLE readyRead;
00149 private:
00150     mitkConeBeamRealTimePD(const mitkConeBeamRealTimePD&);
00151     void operator = (const mitkConeBeamRealTimePD&);
00152 
00153     
00154 };
00155  
00156 //#define DEFINED_mitkConeBeamRealTimePD
00157  
00158 
00159 
00160 
00161 #endif 
00162 

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