CutModelSaveBinInfo.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   wxMaracas
00004   Module:    $RCSfile: CutModelSaveBinInfo.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009/09/08 08:14:27 $
00007   Version:   $Revision: 1.1 $
00008 
00009   Copyright: (c) 2002, 2003
00010   License:
00011   
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notice for more information.
00015 
00016 =========================================================================*/
00017 
00018 
00019 
00020 
00021 #ifndef __CutModelSaveBinInfoH__
00022 #define __CutModelSaveBinInfoH__
00023 
00024 #include <iostream>
00025 #include <vector>
00026 #include "CutModelException.h"
00027 
00028 #include <vtkPolyData.h>
00029 #include <vtkPolyDataWriter.h>
00030 #include <vtkPolyDataReader.h>
00031 #include <vtkPolyDataMapper.h>
00032 #include <vtkTransform.h>
00033 #include <vtkMatrix4x4.h>
00034 #include <vtkActor.h>
00035 
00036 enum UNDOTYPE
00037 {
00038     CUTMODEL_ADD = 0,   
00039         CUTMODEL_REMOVE = 10,
00040         CUTMODEL_CUT= 20,
00041         
00042 };
00043 
00044 class CutModelSaveBinInfo  {
00045 
00046 public:
00047         
00048         CutModelSaveBinInfo(int id, int currentaction,UNDOTYPE actiontype, std::string path);
00049         ~CutModelSaveBinInfo();
00050 
00051         int getId(){
00052                 return _id;
00053         }       
00054 
00055         UNDOTYPE getActionType(){
00056                 return _actiontype;
00057         }
00058         std::string getSTDFileName()throw( CutModelException){
00059                 if(_stdFilename==""){
00060                         throw new CutModelException("Filename undoredo does not exists");
00061                 }
00062                 return _stdFilename;
00063         }
00064 
00065         /*void setSTDFileName(std::string filename){
00066                 _stdFilename = filename;
00067         }*/
00068 
00069         int getCurrentShape(){
00070                 return _currentshape;
00071         }
00072 
00073         void setCurrentShape(int currentshape){
00074                 _currentshape=currentshape;
00075         }
00076 
00077         void savePolyData(vtkPolyData* polydata);
00078 
00079         vtkTransform* getPolyDataTransform()throw( CutModelException);  
00080 
00081         void saveMatrix4x4(vtkMatrix4x4* matrix);
00082         vtkTransform* getTransformFromMatrixFile()throw( CutModelException);
00083 
00084         void setRange(double* range){
00085                 _range = range;
00086         }
00087         void setIsInside(bool isinside){
00088                 _isinside = isinside;
00089         }
00090 
00091         double* getRange(){
00092                 return _range;
00093         }
00094         bool getIsInside(){
00095                 return _isinside;
00096         }
00097         
00098 private:                
00099         
00100         int _id;
00101         UNDOTYPE _actiontype;
00102         int _currentshape;
00103         double* _range;
00104         bool _isinside;
00105         std::string _stdFilename;               
00106         std::string _matrixFilename;    
00107 };
00108 
00109 
00110 
00111 #endif 

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1