vtkKWMimxCreateFEMeshFromBBGroup.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003 Program:   MIMX Meshing Toolkit
00004 Module:    $RCSfile: vtkKWMimxCreateFEMeshFromBBGroup.h,v $
00005 Language:  C++
00006 Date:      $Date: 2008/10/17 03:37:39 $
00007 Version:   $Revision: 1.24.2.1 $
00008 
00009  Musculoskeletal Imaging, Modelling and Experimentation (MIMX)
00010  Center for Computer Aided Design
00011  The University of Iowa
00012  Iowa City, IA 52242
00013  http://www.ccad.uiowa.edu/mimx/
00014  
00015 Copyright (c) The University of Iowa. All rights reserved.
00016 See MIMXCopyright.txt or http://www.ccad.uiowa.edu/mimx/Copyright.htm for details.
00017 
00018 This software is distributed WITHOUT ANY WARRANTY; without even 
00019 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00020 PURPOSE.  See the above copyright notices for more information.
00021 
00022 =========================================================================*/
00023 // .NAME vtkKWMimxCreateFEMeshFromBBGroup - Class to create surface or solid FE mesh.
00024 //
00025 // .SECTION Description
00026 // The class defines the GUI for FE mesh creation. Both surface and solid as well as
00027 // quad, hex, tet and tri meshes can be created. Also meshes can be created by extruding
00028 // the current mesh or a portion of the same. Element set creation option is once again
00029 // used to select the element sets but for the surface elements. Option also exists for
00030 // the specification of node and element numbers. If creation of FE mesh from building
00031 // block is being used, the type of interpolation technique (elliptical or transfinite)
00032 // to calculate the location of interior nodes and smoothing option (laplacian) iterations
00033 // can also be specified.
00034 //
00035 // .SECTION See Also
00036 // vtkKWMimxDefineElSetGroup, vtkMimxSolidEllipticalInterpolation, 
00037 // vtkMimxSolidTransfiniteInterpolation
00038 
00039 #ifndef __vtkKWMimxCreateFEMeshFromBBGroup_h
00040 #define __vtkKWMimxCreateFEMeshFromBBGroup_h
00041 
00042 #include "vtkKWMimxGroupBase.h"
00043 #include "vtkKWMimxFEMeshMenuGroup.h"
00044 #include "vtkKWMimxMainWindow.h"
00045 #include "vtkKWMimxSurfaceMenuGroup.h"
00046 #include "vtkBuildingBlockWin32Header.h"
00047 
00048 
00049 #define HEX_BB_SOLID_MESH          1
00050 #define HEX_EXTRUDE_SOLID_MESH     2
00051 #define TET_BB_SOLID_MESH          3
00052 #define TET_EXTRUDE_SOLID_MESH     4
00053 #define QUAD_BB_SURFACE_MESH       5
00054 #define QUAD_EXTRACT_SURFACE_MESH  6
00055 #define TRI_BB_SURFACE_MESH        7
00056 #define TRI_EXTRACT_SURFACE_MESH   8
00057 
00058 class vtkIntArray;
00059 
00060 class vtkKWCheckButtonWithLabel;
00061 class vtkKWComboBoxWithLabel;
00062 class vtkKWEntryWithLabel;
00063 class vtkKWMenuButton;
00064 class vtkKWMenuButtonWithLabel;
00065 class vtkKWPushButton;
00066 class vtkKWRadioButton;
00067 
00068 class vtkKWMimxDefineElSetGroup;
00069 class vtkKWMimxNodeElementNumbersGroup;
00070 class vtkMimxMeshActor;
00071 
00072 class VTK_BUILDINGBLOCK_EXPORT vtkKWMimxCreateFEMeshFromBBGroup : public vtkKWMimxGroupBase
00073 {
00074 public:
00075 
00076   static vtkKWMimxCreateFEMeshFromBBGroup* New();
00077   vtkTypeRevisionMacro(vtkKWMimxCreateFEMeshFromBBGroup,vtkKWMimxGroupBase);
00078   void PrintSelf(ostream& os, vtkIndent indent);
00079   virtual void Update();
00080   virtual void UpdateEnableState();
00081 
00082   void CreateFEMeshFromBBDoneCallback();
00083 
00084   // Description:
00085   // Method to invoke FE mesh creation
00086   int CreateFEMeshFromBBApplyCallback();
00087 
00088   // Description:
00089   // Method to hide the GUI
00090   void CreateFEMeshFromBBCancelCallback();
00091 
00092   // Description:
00093   // Check box call back to whether the mesh created be smoothed or not.
00094   // If chosen, the number of iterations entry for smoothing is enabled.
00095   void SmoothFEMeshCallback(int state);
00096 
00097   // Description:
00098   // Update the FE mesh list. Used when the GUI is redrawn or to add newly
00099   // created FE mesh to the list.
00100   void UpdateObjectLists();
00101 
00102   // Description:
00103   // Show the GUI required for volumetric meshing
00104   void VolumetricMeshCallback();
00105 
00106   // Description:
00107   // Show the GUI required for surface meshing
00108   void SurfaceMeshCallback();
00109 
00110   // Description:
00111   // GUI for volumetric mesh from building block method.
00112   void VolumetricMeshBBCallback();
00113 
00114   // Description:
00115   // GUI for volumetric mesh from extrusion.
00116   void VolumetricMeshExtrudeCallback();
00117 
00118   // Description:
00119   // Choose the interpolation mode between Elliptical and Transfinite
00120   void InterpolationModeCallback();
00121 
00122   // Description:
00123   // Creation of surface mesh building block method
00124   void SurfaceMeshBBCallback();
00125 
00126   // Description:
00127   // Extract the surface mesh
00128   void SurfaceMeshExtractCallback();
00129 
00130   // Description:
00131   // Launch the window from which a subset selection of FE mesh be made
00132   void DefineRegionCallback();
00133 
00134   // Description:
00135   // Get the meshing mode. 8 types of meshing exist. Look for the description
00136   // at the beginning of the header file.
00137   int  GetMeshingMode( );
00138 
00139   // Description:
00140   // Any newly created mesh by default contains 5 mesh field data. 1) A cell data for element numbers
00141   // 2) Point data for node numbers, 3) Field data string array for element set names,
00142   // 4) Field data string array for node set names and 5) Filed data for number of boundary condition steps.
00143   void InitializeMeshFieldData(vtkUnstructuredGrid *mesh, const char *nodeSetName, 
00144                      const char *elementSetName, int nodeNumber, int elementNumber);
00145 
00146   // Description:
00147   // Create mesh from building block
00148   int CreateMeshFromBuildingBlock(vtkPolyData *polyDaya, vtkUnstructuredGrid *buildingBlock, 
00149                      bool smoothMesh, int numSmooth, const char *nodeSetName, int nodeNumber, 
00150                      const char *elementSetName, int elementNumber, int numRecalc, 
00151                      bool generateSurfaceMesh, bool generateTriMesh, const char *FoundationName);
00152 
00153   // Description:
00154   // Extrude hexahedral solid mesh from the chosen surface subset
00155   int ExtrudeHexSolidMesh(vtkMimxMeshActor *MeshActor, const char *NodeSetName,
00156           const char *ElSetName, int StartNodeNum, int StartElemNum,
00157           int NumberOfDiv, double ExtrusionLength, const char *FoundationName);
00158 
00159   // Description:
00160   // Create a surface mesh
00161         int ExtractSurfaceMesh(vtkMimxMeshActor *MeshActor, const char *NodeSetName,
00162           const char *ElSetName, int StartNodeNum, int StartElemNum, bool generateTriMesh, const char *FoundationName);
00163 protected:
00164         vtkKWMimxCreateFEMeshFromBBGroup();
00165         ~vtkKWMimxCreateFEMeshFromBBGroup();
00166         virtual void CreateWidget();
00167   
00168   vtkKWFrame *ModeFrame;
00169   vtkKWRadioButton *VolumetricMeshButton;
00170   vtkKWRadioButton *SurfaceMeshButton;
00171   vtkKWRadioButton *HexMeshButton;
00172   vtkKWRadioButton *TetMeshButton;
00173   vtkKWRadioButton *QuadMeshButton;
00174   vtkKWRadioButton *TriMeshButton;
00175   vtkKWMenuButton *TypeMenuButton;
00176   vtkKWMenuButtonWithLabel *InterpolationMenuButton;
00177   
00178   vtkKWFrameWithLabel *ComponentFrame;
00179   vtkKWComboBoxWithLabel *SurfaceListComboBox;
00180   vtkKWComboBoxWithLabel *BBListComboBox;
00181   vtkKWComboBoxWithLabel *MeshListComboBox;
00182   vtkIntArray *OriginalPosition;
00183   vtkKWFrame *SmoothFrame;
00184   vtkKWFrame *InterpFrame;
00185   vtkKWEntryWithLabel *SmoothingIterationsEntry;
00186   vtkKWEntryWithLabel *ElementSetNameEntry;
00187   vtkKWEntryWithLabel *RecalculationIterationsEntry;
00188   vtkKWMimxNodeElementNumbersGroup *NodeElementNumbersGroup;
00189   vtkKWFrameWithLabel *MeshImprovementFrame;
00190   vtkKWCheckButtonWithLabel *SmoothButton;
00191   vtkKWFrame *SelectFrame;
00192   vtkKWRadioButton *SelectSurfaceButton;
00193   vtkKWRadioButton *SelectFaceButton;
00194   vtkKWRadioButton *SelectElementButton;
00195   vtkKWPushButton *SelectButton;
00196   vtkKWMimxDefineElSetGroup *DefineElementSetDialog;
00197   
00198 private:
00199   vtkKWMimxCreateFEMeshFromBBGroup(const vtkKWMimxCreateFEMeshFromBBGroup&); // Not implemented
00200   void operator=(const vtkKWMimxCreateFEMeshFromBBGroup&); // Not implemented
00201   
00202   int ExtractCount;
00203   int BBCount;
00204   int ExtrudeCount;
00205  };
00206 
00207 #endif
00208 

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1