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

mitkTrackedBscanData.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 __mitkTrackedBscanData_h
00012 #define __mitkTrackedBscanData_h
00013 
00014 #include "mitkRawData.h"
00015 #include "mitkVolume.h"
00016 #include "mitkMatrix.h"
00017 
00043 
00044 class MITK_RECONSTRUCTION_API mitkTrackedBscanData : public mitkRawData
00045 {
00046 public:
00047     MITK_TYPE(mitkTrackedBscanData, mitkRawData)
00048 
00049     virtual void PrintSelf(ostream &os);
00050 
00051 
00055     virtual void Initialize();
00056 
00061     virtual int GetDataObjectType() const { return MITK_TRACKED_BSCAN_DATA; }
00062 
00067     void SetImageWidth(int w){m_SliceSize[0]=w;}
00068 
00073     int GetImageWidth(){return m_SliceSize[0];}
00074 
00079     void SetImageHeight(int h){m_SliceSize[1]=h;}
00080 
00085     int GetImageHeight(){return m_SliceSize[1];}
00086 
00091     void SetNumberOfSlices(int s);
00092 
00097     int  GetNumberOfSlices(){return m_SliceSize[2];}
00098 
00105     void GetVolumeDimensions(int dims[3])
00106     {
00107         dims[0] = m_VolumeSize[0];
00108         dims[1] = m_VolumeSize[1];
00109         dims[2] = m_VolumeSize[2];
00110     }
00111 
00118     void SetVolumeDimensions(int dims[3])
00119     {
00120         m_VolumeSize[0] = dims[0];
00121         m_VolumeSize[1] = dims[1];
00122         m_VolumeSize[2] = dims[2];
00123     }
00124 
00131     void GetPixelSpacings(float s[3])
00132     {
00133         s[0] = m_PixelSpacings[0];
00134         s[1] = m_PixelSpacings[1];
00135         s[2] = m_PixelSpacings[2];
00136     }
00137 
00144     void SetPixelSpacings(float s[3])
00145     {
00146         m_PixelSpacings[0] = s[0];
00147         m_PixelSpacings[1] = s[1];
00148         m_PixelSpacings[2] = s[2];
00149     }
00150 
00151 
00158     void GetVoxelSpacings(float s[3])
00159     {
00160         s[0] = m_VoxelSpacings[0];
00161         s[1] = m_VoxelSpacings[1];
00162         s[2] = m_VoxelSpacings[2];
00163     }
00164 
00171     void SetVoxelSpacings(float s[3])
00172     {
00173         m_VoxelSpacings[0] = s[0];
00174         m_VoxelSpacings[1] = s[1];
00175         m_VoxelSpacings[2] = s[2];
00176     }
00177 
00186     void SetNumberOfChannel(int n){m_NumberOfChannel=n;}
00187 
00196     int GetNumberOfChannel(){return m_NumberOfChannel;}
00197 
00206     virtual void* GetData()=0;
00207 
00217     virtual void* GetSliceData(int sliceIdx)=0;
00218 
00227     virtual bool WriteSliceData(int sliceIdx, void const *src)=0;
00228 
00235     bool SetRToTMatrix(int sliceIdx, mitkMatrix const *ptor);
00236 
00243     mitkMatrix * GetRToTMatrix(int sliceIdx);
00244 
00250     mitkMatrix * GetRToTMatrix();
00251 
00264     virtual bool Allocate()=0;
00265 
00270     virtual unsigned long long GetActualMemorySize() const=0;
00271 
00275     virtual void ShallowCopy(mitkDataObject *src)=0;
00276 
00280     virtual void DeepCopy(mitkDataObject *src)=0;
00281 
00287     void SetPToRMatrix(mitkMatrix const *ptor) { m_PToR = *ptor; }
00288 
00294     mitkMatrix GetPToRMatrix() { return m_PToR; }
00295 
00301     void SetTToCMatrix(mitkMatrix const *ttoc) { m_TToC = *ttoc; }
00302 
00308     mitkMatrix GetTToCMatrix() { return m_TToC; }
00309 
00314     void SetPredetermined(bool predet) { m_IsPredetermined = predet; }
00315 
00320     bool IsPredetermined() { return m_IsPredetermined; }
00321 
00322 
00323 protected:
00324     virtual ~mitkTrackedBscanData();
00325     mitkTrackedBscanData();
00326 
00327 
00328 //  mitkVolume *m_Slices;
00329 
00330     // Pointing to the entry address of a group of RToT matrices attached to the slices.
00331     mitkMatrix *m_Matrices;
00332 
00333     // Calibrated transformation matrix from the B-Scan Plane coordinate system to the 
00334     // Receiver coordinate system.
00335     mitkMatrix m_PToR;
00336 
00337     // Predetermined transformation matrix from the Transmitter coordinate system to the 
00338     // Reconstruction Volume coordinate system.
00339     mitkMatrix m_TToC;
00340 
00341     int  m_NumberOfChannel;
00342     int  m_SliceSize[3];
00343     float m_PixelSpacings[3];
00344 
00345     // Predetermined volume size and voxel size (spacings) of the reconstruction volume.
00346     int m_VolumeSize[3];
00347     float m_VoxelSpacings[3];
00348 
00349     // If the m_TToC, volume size and voxel size (spacings) are predetermined, 
00350     // this flag is true.
00351     bool m_IsPredetermined;
00352 
00353 private:
00354     mitkTrackedBscanData(const mitkTrackedBscanData&);
00355     void operator = (const mitkTrackedBscanData&);
00356 
00357 };
00358 
00359 
00360 //#define DEFINED_mitkTrackedBscanData
00361 
00362 
00363 
00364 #endif
00365 

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