00001
00002
00004
00005 #if !defined(AFX_TVOLMODELL_H__87BF1B49_AF38_48E1_B919_01F65AF08018__INCLUDED_)
00006 #define AFX_TVOLMODELL_H__87BF1B49_AF38_48E1_B919_01F65AF08018__INCLUDED_
00007
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011
00012 #include <qstring.h>
00013 #include <qimage.h>
00014 #include "TMemBmp.h"
00015 #include "TFilterInterface.h"
00016 #include "TKoo3d.h"
00017 #include "TStdPlane.h"
00018 #include "TTransferFuncInterface.h"
00019
00020 #define VOL_MOD_PIXELMODE_DENSITY 1
00021 #define VOL_MOD_PIXELMODE_SHADED 2
00022 #define VOL_MOD_PIXELMODE_TRANSFERF 3
00023 #define VOL_MOD_PIXELMODE_GRADIENT 4
00024
00026
00041 class TVolModell
00042 {
00043 public:
00045
00049 virtual TKoo3d<float> getLightDir()=0;
00051
00056 virtual TFilterInterface* getFilter()=0;
00058
00064 virtual void getBoundingPlanes(TStdPlane<float>* array)=0;
00066
00070 virtual float getAmbientCoeff()=0;
00072
00076 virtual float getSpecularCoeff()=0;
00078
00082 virtual float getDiffuseCoeff()=0;
00084
00088 virtual int getSpecularExp()=0;
00090
00097 virtual void setTransferFunction(TTransferFuncInterface* tf)=0;
00099
00107 virtual void setTransferFunction(unsigned int* transf)=0;
00109
00124 virtual unsigned int getPixelFilteredAt(float x, float y, float z, int type)=0;
00126
00134 virtual void getHistogrammArray(unsigned int* a, int size)=0;
00135 TVolModell();
00137
00146 virtual void setLighting(float ambient, float diffuse, float specular, int exponent)=0;
00148
00152 virtual void loadFromFile(QString& name)=0;
00154
00161 virtual unsigned int getPixelAt(int x, int y, int z)=0;
00163
00167 virtual int getSizeX()=0;
00169
00173 virtual int getSizeY()=0;
00175
00180 virtual void setLightDir(TKoo3d<float>& dir)=0;
00182
00186 virtual int getSizeZ()=0;
00188
00193 virtual int getPixelMode()=0;
00195
00201 virtual void setPixelMode(int mode)=0;
00203
00212 virtual void calcShading(bool askUser)=0;
00213 virtual ~TVolModell();
00215
00225 virtual QImage* getXSlice(QImage& imgBuff,QPoint& offs, int pos, int winS=0, int winE=0xfff)=0;
00227
00237 virtual QImage* getYSlice(QImage& imgBuff,QPoint& offs, int pos, int winS=0, int winE=0xfff)=0;
00239
00249 virtual QImage* getZSlice(QImage& imgBuff,QPoint& offs, int pos, int winS=0, int winE=0xfff)=0;
00251
00263 virtual QImage* getXSlice(QImage& imgBuff, int pos, int renderMode=0, int sizeX=0, int sizeY=0, int winS=0, int winE=0xfff)=0;
00265
00277 virtual QImage* getYSlice(QImage& imgBuff, int pos, int renderMode=0, int sizeX=0, int sizeY=0, int winS=0, int winE=0xfff)=0;
00279
00291 virtual QImage* getZSlice(QImage& imgBuff, int pos, int renderMode=0, int sizeX=0, int sizeY=0, int winS=0, int winE=0xfff)=0;
00292
00293
00295
00301 virtual unsigned int* getTransF()=0;
00303
00310 virtual void getMaxValues(int* d)=0;
00311 virtual void setFilter(TFilterInterface* f)=0;
00312 virtual TKoo3d<float> getGradient(int x, int y, int z)=0;
00313 virtual TKoo3d<float> getGradientInterpolated(float x, float y, float z)=0;
00314 };
00315
00316 #endif // !defined(AFX_TVOLMODELL_H__87BF1B49_AF38_48E1_B919_01F65AF08018__INCLUDED_)