Visualize3DDoc.h

00001     // Visualize3DDoc.h : Schnittstelle der Klasse CVisualize3DDoc
00002 
00003 #pragma once
00004 
00005 #include "TransferFunction.h"
00006 #include "VisVector.h"
00007 
00008 class TransferFunction;
00009 
00010 
00041 class CVisualize3DDoc : public CDocument
00042 {
00043 
00044 private:
00045     TransferFunction* tf;
00046 
00047 public:
00048      unsigned short*** m_data;                      //3D array of intensity values of volume
00049      CVisVector*** m_gradients;                     //3D array of calculated gradients for each voxel
00050      unsigned short* imgSize;                       //array for storing x,y,z dimension of volume
00051      int minVal, maxVal;                            //min and max intensity value occuring in volume
00052      unsigned short* histogram;                     //histogram of volume (x: intensity value, y: amount of voxels with intensity x
00053      int m_nCurrentProgress;                        //progress for setting progressbar (not used at moment)
00054 
00055 
00056 private:
00057      void CalcHistogram();                          //calculates histogram
00058 
00059 protected: // Nur aus Serialisierung erstellen
00060     CVisualize3DDoc();
00061     DECLARE_DYNCREATE(CVisualize3DDoc)
00062 
00063 public:
00064     void ReadVolume( CString  filename);            //reads volume from .dat file 
00065                                                     //.dat file: first 3 values specify x,y,z dimension and then are values (each entry 2 bytes)
00066     
00067     int getDimX();                                  //returns x dimension
00068     int getDimY();
00069     int getDimZ();
00070 
00071     bool VolumeExists();                            //returns true if volume was already read
00072     void ResetAll();                                //resets and clears data
00073     TransferFunction* GetTransferFunction();        //returns transferfunction of volume
00074     unsigned short* GetHistogram();                 //returns histogram of volume
00075     BOOL DoSave(LPCTSTR lpszPathName, BOOL bReplace); //not implemented
00076     void Fill2DArray(int viewPlane, unsigned short* data2D, int sliceNo); //fills 2D array with intensity values of specified slice of volume
00077     void CalculateGradients();                      //calculates gradients of each voxel
00078 
00079 
00080     //default
00081     virtual BOOL OnNewDocument(); 
00082     virtual void Serialize(CArchive& ar);
00083     virtual ~CVisualize3DDoc();
00084 
00085 #ifdef _DEBUG
00086     virtual void AssertValid() const;
00087     virtual void Dump(CDumpContext& dc) const;
00088 #endif
00089 
00090 protected:
00091     DECLARE_MESSAGE_MAP()
00092 };
00093 
00094 

Generated on Thu Dec 9 12:08:19 2004 for Visualize3D by doxygen 1.3.1 using KingsTools