00001 /*========================================================================= 00002 00003 Program: MIMX Meshing Toolkit 00004 Module: $RCSfile: vtkKWMimxEvaluateMeshQualityGroup.h,v $ 00005 Language: C++ 00006 Date: $Date: 2008/10/17 03:37:39 $ 00007 Version: $Revision: 1.15.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 00024 #ifndef __vtkKWMimxEvaluateMeshQualityGroup_h 00025 #define __vtkKWMimxEvaluateMeshQualityGroup_h 00026 00027 #include "vtkKWMimxGroupBase.h" 00028 #include "vtkBuildingBlockWin32Header.h" 00029 00030 00031 class vtkDoubleArray; 00032 class vtkIdList; 00033 00034 class vtkKWComboBoxWithLabel; 00035 class vtkKWCheckButton; 00036 class vtkKWCheckButtonWithLabel; 00037 class vtkKWEntryWithLabel; 00038 class vtkKWFrame; 00039 class vtkKWLabel; 00040 class vtkKWListBoxWithScrollbars; 00041 class vtkKWLoadSaveDialog; 00042 class vtkKWMenuButtonWithLabel; 00043 class vtkKWPushButton; 00044 00045 class vtkKWMimxViewPropertiesOptionGroup; 00046 00047 #define MESH_QUALITY_VOLUME 1 00048 #define MESH_QUALITY_EDGE 2 00049 #define MESH_QUALITY_JACOBIAN 3 00050 #define MESH_QUALITY_SKEW 4 00051 #define MESH_QUALITY_ANGLE 5 00052 #define MESH_QUALITY_MIN_ANGLE 6 00053 #define MESH_QUALITY_MAX_ANGLE 7 00054 00055 class VTK_BUILDINGBLOCK_EXPORT vtkKWMimxEvaluateMeshQualityGroup : public vtkKWMimxGroupBase 00056 { 00057 public: 00058 static vtkKWMimxEvaluateMeshQualityGroup* New(); 00059 vtkTypeRevisionMacro(vtkKWMimxEvaluateMeshQualityGroup,vtkKWMimxGroupBase); 00060 void PrintSelf(ostream& os, vtkIndent indent); 00061 virtual void Update(); 00062 virtual void UpdateEnableState(); 00063 void UpdateObjectLists(); 00064 00065 00066 // Description: 00067 // Hide the GUI being displayed 00068 int EvaluateMeshQualityCancelCallback(); 00069 00070 // Description: 00071 // Evaluate the mesh quality based on the type chosen. Quality 00072 // types are defined at the beginning of the header file 1 to 7 00073 int EvaluateMeshQualityApplyCallback(int qualityType); 00074 00075 // Description: 00076 // Show only the distorted elements 00077 int ViewDistortedElemenetsCallback(); 00078 00079 // Description: 00080 // Hide the GUI associated with the distorted elements 00081 int DistortedElementDialogCancelCallback(); 00082 00083 // Description: 00084 // Store the chosen mesh quality in .csv style format 00085 int DistortedElementDialogSaveCallback(); 00086 00087 // Description: 00088 // Invert the cutting plane used to visualize the internal elements 00089 int InvertPlaneCallback(int mode); 00090 00091 // Description: 00092 // Show/hide the clipping plane 00093 int ClippingPlaneCallback(int mode); 00094 00095 // Description: 00096 // To display the chosen quality metric values for the given mesh 00097 int ViewQualityLegendCallback(int mode); 00098 00099 // Description: 00100 // Setting the quality type metric for given volume 00101 int SetQualityTypeToVolume() {QualityType = MESH_QUALITY_VOLUME; 00102 return 1;}; 00103 int SetQualityTypeToEdgeCollapse() {QualityType = MESH_QUALITY_EDGE; 00104 return 1;}; 00105 int SetQualityTypeToJacobian() {QualityType = MESH_QUALITY_JACOBIAN; 00106 return 1;}; 00107 int SetQualityTypeToSkew() {QualityType = MESH_QUALITY_SKEW; 00108 return 1;}; 00109 int SetQualityTypeToAngle() {QualityType = MESH_QUALITY_ANGLE; 00110 return 1;}; 00111 00112 // Description: 00113 // Reset the values of all the entries in the GUI 00114 void ClearStatsEntry(); 00115 00116 // Description: 00117 // Call back for selected mesh change 00118 void SelectionChangedCallback(const char* selection); 00119 00120 // Description: 00121 // To launch a window containing options for setting mesh quality 00122 // visualization properties 00123 void DisplayOptionsCallback(); 00124 protected: 00125 vtkKWMimxEvaluateMeshQualityGroup(); 00126 ~vtkKWMimxEvaluateMeshQualityGroup(); 00127 00128 vtkKWComboBoxWithLabel *MeshListComboBox; 00129 00130 // Description: 00131 // Create the widget. 00132 virtual void CreateWidget(); 00133 00134 vtkKWFrameWithLabel *DisplayFrame; 00135 vtkKWFrame *ViewFrame; 00136 vtkKWFrameWithLabel *ComponentFrame; 00137 00138 vtkKWEntryWithLabel *NumberOfDistortedEntry; 00139 vtkKWEntryWithLabel *NumberOfElementsEntry; 00140 vtkKWEntryWithLabel *QualityMinimumEntry; 00141 vtkKWEntryWithLabel *QualityMaximumEntry; 00142 vtkKWEntryWithLabel *QualityAverageEntry; 00143 vtkKWEntryWithLabel *QualityVarianceEntry; 00144 vtkKWPushButton *SaveButton; 00145 vtkKWCheckButton *ViewQualityButton; 00146 vtkKWCheckButton *ClippingPlaneButton; 00147 vtkKWCheckButton *ViewLegendButton; 00148 vtkKWCheckButtonWithLabel *InvertPlaneButton; 00149 vtkKWTopLevel *DistortedElementDialog; 00150 vtkKWFrame *DistortedButtonFrame; 00151 vtkKWPushButton *SaveDistortedButton; 00152 vtkKWPushButton *CancelDistortedButton; 00153 vtkKWListBoxWithScrollbars *DistortedElementsReport; 00154 vtkKWLoadSaveDialog *FileBrowserDialog; 00155 vtkKWFrame *ButtonFrame; 00156 vtkKWFrame *SummaryFrame; 00157 vtkKWFrame *SummaryReviewFrame; 00158 vtkKWMenuButtonWithLabel *QualityTypeButton; 00159 vtkKWLabel *QualityTypeLabel; 00160 vtkKWLabel *DistoredListLabel; 00161 vtkKWPushButton *DisplayOptionsButton; 00162 vtkKWMimxViewPropertiesOptionGroup* ViewOptionsGroup; 00163 private: 00164 vtkKWMimxEvaluateMeshQualityGroup(const vtkKWMimxEvaluateMeshQualityGroup&); // Not implemented. 00165 void operator=(const vtkKWMimxEvaluateMeshQualityGroup&); // Not implemented. 00166 00167 vtkIdList *DistortedElementList; 00168 vtkDoubleArray *DistortedMeshQuality; 00169 int NumberOfCells; 00170 int QualityType; 00171 char meshName[64]; 00172 char qualityName[64]; 00173 char PreviousSelection[64]; 00174 double minimumQuality; 00175 double maximumQuality; 00176 double averageQuality; 00177 double varianceQuality; 00178 //void AddOrientationWidget(void); 00179 00180 }; 00181 00182 #endif
1.6.1