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

Display.hpp

Go to the documentation of this file.
00001 /* ImLib3D
00002  * Copyright (c) 2001, ULP-IPB Strasbourg.
00003  *
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2 of the License, or (at
00007  * your option) any later version.
00008  * 
00009  * This program is distributed in the hope that it will be useful, but
00010  * WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * General Public License for more details.
00013  * 
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017  */
00019 
00020 
00024 #ifndef _Display_hpp
00025 #define _Display_hpp
00026 
00027 #include<ImLib3D/Image3D.hpp>
00028 #include<ImLib3D/ImLib3D.hpp>
00029 #include<ImLib3D/Image3DSet.hpp>
00030 class ImLib3DDisplay;
00031 
00032 
00034 
00037 class ImLib3DDisplay
00038 {
00039 protected:
00040     ImLib3DDisplay(){;}
00041 public:
00042     template<class ImageType>
00043     static  void Show(const ImageType &ima);
00044 //  template<class ImageType>
00045     static  void ShowSet(Image3DSet<Image3Df> &images);
00046     virtual void ShowImage(const Image3Df &ima)=0;  
00047     virtual void ShowImages(Image3DSet<Image3Df> &ima)=0;   
00048     static  void Set(ImLib3DDisplay *newDisp);
00049 };
00050 
00052 class TextDisplay : public ImLib3DDisplay
00053 {
00054 public:
00055     virtual void ShowImage(const Image3Df &ima);
00056     virtual void ShowImages(Image3DSet<Image3Df> &images);  
00057     TextDisplay(){;}
00058 };
00059 
00061 class ViewerDisplay : public ImLib3DDisplay
00062 {
00063     string prgPath;
00064 public:
00065     virtual ~ViewerDisplay(){;}
00066     virtual void ShowImage(const Image3Df &ima);
00067     virtual void ShowImages(Image3DSet<Image3Df> &images);  
00068     ViewerDisplay();
00069 };
00070 
00071 template<class ImageType>
00072 void ImLib3DDisplay::Show(const ImageType &ima)
00073 {
00074     Image3Df imaf;imaf=ima;
00075     imLib3D.display->ShowImage(imaf);
00076 }
00077 
00078 //works only for Image3Df at the moment
00079 //template <class ImageType>
00080 inline void 
00081 ImLib3DDisplay::ShowSet(Image3DSet<Image3Df> & images)
00082 {
00083     imLib3D.display->ShowImages(images);
00084 }
00085 
00086 
00087 #endif // _Display_hpp

Generated on Fri Jun 17 13:36:00 2005 for ImLib3D by  doxygen 1.4.2