[cig-commits] r20302 - in seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization: VTK VTK_ParaView
dkomati1 at geodynamics.org
dkomati1 at geodynamics.org
Mon Jun 4 11:13:02 PDT 2012
Author: dkomati1
Date: 2012-06-04 11:13:02 -0700 (Mon, 04 Jun 2012)
New Revision: 20302
Added:
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/bin_image.png
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/blue_white_red.cpt
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/convert_cpt_lookuptable_python.bash
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/gray_pyramid_inv.cpt
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/plot_VTK.py
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/plot_VTK_gray.py
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/plot_movie_GMT_binary_VTK.pl
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/readme_VTK.txt
Removed:
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/bin_image.png
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/blue_white_red.cpt
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/convert_cpt_lookuptable_python.bash
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/gray_pyramid_inv.cpt
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_VTK.py
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_VTK_gray.py
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_movie_GMT_binary_VTK.pl
seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/readme.txt
Log:
moved some files
Deleted: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/bin_image.png
===================================================================
(Binary files differ)
Deleted: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/blue_white_red.cpt
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/blue_white_red.cpt 2012-06-04 18:12:05 UTC (rev 20301)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/blue_white_red.cpt 2012-06-04 18:13:02 UTC (rev 20302)
@@ -1,261 +0,0 @@
-# cpt file created by: makecpt -V -Cpolar -T0/255/1 -Z
-#COLOR_MODEL = RGB
-#
-0 0 0 255 1 2 2 255
-1 2 2 255 2 4 4 255
-2 4 4 255 3 6 6 255
-3 6 6 255 4 8 8 255
-4 8 8 255 5 10 10 255
-5 10 10 255 6 12 12 255
-6 12 12 255 7 14 14 255
-7 14 14 255 8 16 16 255
-8 16 16 255 9 18 18 255
-9 18 18 255 10 20 20 255
-10 20 20 255 11 22 22 255
-11 22 22 255 12 24 24 255
-12 24 24 255 13 26 26 255
-13 26 26 255 14 28 28 255
-14 28 28 255 15 30 30 255
-15 30 30 255 16 32 32 255
-16 32 32 255 17 34 34 255
-17 34 34 255 18 36 36 255
-18 36 36 255 19 38 38 255
-19 38 38 255 20 40 40 255
-20 40 40 255 21 42 42 255
-21 42 42 255 22 44 44 255
-22 44 44 255 23 46 46 255
-23 46 46 255 24 48 48 255
-24 48 48 255 25 50 50 255
-25 50 50 255 26 52 52 255
-26 52 52 255 27 54 54 255
-27 54 54 255 28 56 56 255
-28 56 56 255 29 58 58 255
-29 58 58 255 30 60 60 255
-30 60 60 255 31 62 62 255
-31 62 62 255 32 64 64 255
-32 64 64 255 33 66 66 255
-33 66 66 255 34 68 68 255
-34 68 68 255 35 70 70 255
-35 70 70 255 36 72 72 255
-36 72 72 255 37 74 74 255
-37 74 74 255 38 76 76 255
-38 76 76 255 39 78 78 255
-39 78 78 255 40 80 80 255
-40 80 80 255 41 82 82 255
-41 82 82 255 42 84 84 255
-42 84 84 255 43 86 86 255
-43 86 86 255 44 88 88 255
-44 88 88 255 45 90 90 255
-45 90 90 255 46 92 92 255
-46 92 92 255 47 94 94 255
-47 94 94 255 48 96 96 255
-48 96 96 255 49 98 98 255
-49 98 98 255 50 100 100 255
-50 100 100 255 51 102 102 255
-51 102 102 255 52 104 104 255
-52 104 104 255 53 106 106 255
-53 106 106 255 54 108 108 255
-54 108 108 255 55 110 110 255
-55 110 110 255 56 112 112 255
-56 112 112 255 57 114 114 255
-57 114 114 255 58 116 116 255
-58 116 116 255 59 118 118 255
-59 118 118 255 60 120 120 255
-60 120 120 255 61 122 122 255
-61 122 122 255 62 124 124 255
-62 124 124 255 63 126 126 255
-63 126 126 255 64 128 128 255
-64 128 128 255 65 130 130 255
-65 130 130 255 66 132 132 255
-66 132 132 255 67 134 134 255
-67 134 134 255 68 136 136 255
-68 136 136 255 69 138 138 255
-69 138 138 255 70 140 140 255
-70 140 140 255 71 142 142 255
-71 142 142 255 72 144 144 255
-72 144 144 255 73 146 146 255
-73 146 146 255 74 148 148 255
-74 148 148 255 75 150 150 255
-75 150 150 255 76 152 152 255
-76 152 152 255 77 154 154 255
-77 154 154 255 78 156 156 255
-78 156 156 255 79 158 158 255
-79 158 158 255 80 160 160 255
-80 160 160 255 81 162 162 255
-81 162 162 255 82 164 164 255
-82 164 164 255 83 166 166 255
-83 166 166 255 84 168 168 255
-84 168 168 255 85 170 170 255
-85 170 170 255 86 172 172 255
-86 172 172 255 87 174 174 255
-87 174 174 255 88 176 176 255
-88 176 176 255 89 178 178 255
-89 178 178 255 90 180 180 255
-90 180 180 255 91 182 182 255
-91 182 182 255 92 184 184 255
-92 184 184 255 93 186 186 255
-93 186 186 255 94 188 188 255
-94 188 188 255 95 190 190 255
-95 190 190 255 96 192 192 255
-96 192 192 255 97 194 194 255
-97 194 194 255 98 196 196 255
-98 196 196 255 99 198 198 255
-99 198 198 255 100 200 200 255
-100 200 200 255 101 202 202 255
-101 202 202 255 102 204 204 255
-102 204 204 255 103 206 206 255
-103 206 206 255 104 208 208 255
-104 208 208 255 105 210 210 255
-105 210 210 255 106 212 212 255
-106 212 212 255 107 214 214 255
-107 214 214 255 108 216 216 255
-108 216 216 255 109 218 218 255
-109 218 218 255 110 220 220 255
-110 220 220 255 111 222 222 255
-111 222 222 255 112 224 224 255
-112 224 224 255 113 226 226 255
-113 226 226 255 114 228 228 255
-114 228 228 255 115 230 230 255
-115 230 230 255 116 232 232 255
-116 232 232 255 117 234 234 255
-117 234 234 255 118 236 236 255
-118 236 236 255 119 238 238 255
-119 238 238 255 120 240 240 255
-120 240 240 255 121 242 242 255
-121 242 242 255 122 244 244 255
-122 244 244 255 123 246 246 255
-123 246 246 255 124 248 248 255
-124 248 248 255 125 250 250 255
-125 250 250 255 126 252 252 255
-126 252 252 255 127 254 254 255
-127 254 254 254 128 254 254 254
-128 255 254 254 129 255 252 252
-129 255 252 252 130 255 250 250
-130 255 250 250 131 255 248 248
-131 255 248 248 132 255 246 246
-132 255 246 246 133 255 244 244
-133 255 244 244 134 255 242 242
-134 255 242 242 135 255 240 240
-135 255 240 240 136 255 238 238
-136 255 238 238 137 255 236 236
-137 255 236 236 138 255 234 234
-138 255 234 234 139 255 232 232
-139 255 232 232 140 255 230 230
-140 255 230 230 141 255 228 228
-141 255 228 228 142 255 226 226
-142 255 226 226 143 255 224 224
-143 255 224 224 144 255 222 222
-144 255 222 222 145 255 220 220
-145 255 220 220 146 255 218 218
-146 255 218 218 147 255 216 216
-147 255 216 216 148 255 214 214
-148 255 214 214 149 255 212 212
-149 255 212 212 150 255 210 210
-150 255 210 210 151 255 208 208
-151 255 208 208 152 255 206 206
-152 255 206 206 153 255 204 204
-153 255 204 204 154 255 202 202
-154 255 202 202 155 255 200 200
-155 255 200 200 156 255 198 198
-156 255 198 198 157 255 196 196
-157 255 196 196 158 255 194 194
-158 255 194 194 159 255 192 192
-159 255 192 192 160 255 190 190
-160 255 190 190 161 255 188 188
-161 255 188 188 162 255 186 186
-162 255 186 186 163 255 184 184
-163 255 184 184 164 255 182 182
-164 255 182 182 165 255 180 180
-165 255 180 180 166 255 178 178
-166 255 178 178 167 255 176 176
-167 255 176 176 168 255 174 174
-168 255 174 174 169 255 172 172
-169 255 172 172 170 255 170 170
-170 255 170 170 171 255 168 168
-171 255 168 168 172 255 166 166
-172 255 166 166 173 255 164 164
-173 255 164 164 174 255 162 162
-174 255 162 162 175 255 160 160
-175 255 160 160 176 255 158 158
-176 255 158 158 177 255 156 156
-177 255 156 156 178 255 154 154
-178 255 154 154 179 255 152 152
-179 255 152 152 180 255 150 150
-180 255 150 150 181 255 148 148
-181 255 148 148 182 255 146 146
-182 255 146 146 183 255 144 144
-183 255 144 144 184 255 142 142
-184 255 142 142 185 255 140 140
-185 255 140 140 186 255 138 138
-186 255 138 138 187 255 136 136
-187 255 136 136 188 255 134 134
-188 255 134 134 189 255 132 132
-189 255 132 132 190 255 130 130
-190 255 130 130 191 255 128 128
-191 255 128 128 192 255 126 126
-192 255 126 126 193 255 124 124
-193 255 124 124 194 255 122 122
-194 255 122 122 195 255 120 120
-195 255 120 120 196 255 118 118
-196 255 118 118 197 255 116 116
-197 255 116 116 198 255 114 114
-198 255 114 114 199 255 112 112
-199 255 112 112 200 255 110 110
-200 255 110 110 201 255 108 108
-201 255 108 108 202 255 106 106
-202 255 106 106 203 255 104 104
-203 255 104 104 204 255 102 102
-204 255 102 102 205 255 100 100
-205 255 100 100 206 255 98 98
-206 255 98 98 207 255 96 96
-207 255 96 96 208 255 94 94
-208 255 94 94 209 255 92 92
-209 255 92 92 210 255 90 90
-210 255 90 90 211 255 88 88
-211 255 88 88 212 255 86 86
-212 255 86 86 213 255 84 84
-213 255 84 84 214 255 82 82
-214 255 82 82 215 255 80 80
-215 255 80 80 216 255 78 78
-216 255 78 78 217 255 76 76
-217 255 76 76 218 255 74 74
-218 255 74 74 219 255 72 72
-219 255 72 72 220 255 70 70
-220 255 70 70 221 255 68 68
-221 255 68 68 222 255 66 66
-222 255 66 66 223 255 64 64
-223 255 64 64 224 255 62 62
-224 255 62 62 225 255 60 60
-225 255 60 60 226 255 58 58
-226 255 58 58 227 255 56 56
-227 255 56 56 228 255 54 54
-228 255 54 54 229 255 52 52
-229 255 52 52 230 255 50 50
-230 255 50 50 231 255 48 48
-231 255 48 48 232 255 46 46
-232 255 46 46 233 255 44 44
-233 255 44 44 234 255 42 42
-234 255 42 42 235 255 40 40
-235 255 40 40 236 255 38 38
-236 255 38 38 237 255 36 36
-237 255 36 36 238 255 34 34
-238 255 34 34 239 255 32 32
-239 255 32 32 240 255 30 30
-240 255 30 30 241 255 28 28
-241 255 28 28 242 255 26 26
-242 255 26 26 243 255 24 24
-243 255 24 24 244 255 22 22
-244 255 22 22 245 255 20 20
-245 255 20 20 246 255 18 18
-246 255 18 18 247 255 16 16
-247 255 16 16 248 255 14 14
-248 255 14 14 249 255 12 12
-249 255 12 12 250 255 10 10
-250 255 10 10 251 255 8 8
-251 255 8 8 252 255 6 6
-252 255 6 6 253 255 4 4
-253 255 4 4 254 255 2 2
-254 255 2 2 255 255 0 0
-B 0 0 0
-F 0 0 0
-N 0 0 0
Deleted: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/convert_cpt_lookuptable_python.bash
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/convert_cpt_lookuptable_python.bash 2012-06-04 18:12:05 UTC (rev 20301)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/convert_cpt_lookuptable_python.bash 2012-06-04 18:13:02 UTC (rev 20302)
@@ -1,15 +0,0 @@
-#!/bin/bash
-#
-# based on GMT makecpt
-#
-if [ $# -eq 0 ]; then
- echo "convert_cpt_lookuptable.bash cpt_name_from_gmt (no_green,seis,etc)"
- exit
-fi
-
-cpt=$1
-ncolors=25
-echo "colortable.SetNumberOfTableValues($ncolors)"
-makecpt -C$cpt -I -T0/$ncolors/1 > temp.cpt
-nline=`wc temp.cpt | awk '{print $1}'`
-awk 'NR > 3 && NR < '$nline'-2 {print "colortable.SetTableValue( ",NR-4,",",$2/255,",",$3/255,",",$4/255,",",1.0,")"}' temp.cpt
Deleted: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/gray_pyramid_inv.cpt
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/gray_pyramid_inv.cpt 2012-06-04 18:12:05 UTC (rev 20301)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/gray_pyramid_inv.cpt 2012-06-04 18:13:02 UTC (rev 20302)
@@ -1,261 +0,0 @@
-# cpt file created by: makecpt -V -I -Cgray -T0/128/1 -Z
-#COLOR_MODEL = RGB
-#
-0 255 255 255 1 253 253 253
-1 253 253 253 2 251 251 251
-2 251 251 251 3 249 249 249
-3 249 249 249 4 247 247 247
-4 247 247 247 5 245 245 245
-5 245 245 245 6 243 243 243
-6 243 243 243 7 241 241 241
-7 241 241 241 8 239 239 239
-8 239 239 239 9 237 237 237
-9 237 237 237 10 235 235 235
-10 235 235 235 11 233 233 233
-11 233 233 233 12 231 231 231
-12 231 231 231 13 229 229 229
-13 229 229 229 14 227 227 227
-14 227 227 227 15 225 225 225
-15 225 225 225 16 223 223 223
-16 223 223 223 17 221 221 221
-17 221 221 221 18 219 219 219
-18 219 219 219 19 217 217 217
-19 217 217 217 20 215 215 215
-20 215 215 215 21 213 213 213
-21 213 213 213 22 211 211 211
-22 211 211 211 23 209 209 209
-23 209 209 209 24 207 207 207
-24 207 207 207 25 205 205 205
-25 205 205 205 26 203 203 203
-26 203 203 203 27 201 201 201
-27 201 201 201 28 199 199 199
-28 199 199 199 29 197 197 197
-29 197 197 197 30 195 195 195
-30 195 195 195 31 193 193 193
-31 193 193 193 32 191 191 191
-32 191 191 191 33 189 189 189
-33 189 189 189 34 187 187 187
-34 187 187 187 35 185 185 185
-35 185 185 185 36 183 183 183
-36 183 183 183 37 181 181 181
-37 181 181 181 38 179 179 179
-38 179 179 179 39 177 177 177
-39 177 177 177 40 175 175 175
-40 175 175 175 41 173 173 173
-41 173 173 173 42 171 171 171
-42 171 171 171 43 169 169 169
-43 169 169 169 44 167 167 167
-44 167 167 167 45 165 165 165
-45 165 165 165 46 163 163 163
-46 163 163 163 47 161 161 161
-47 161 161 161 48 159 159 159
-48 159 159 159 49 157 157 157
-49 157 157 157 50 155 155 155
-50 155 155 155 51 153 153 153
-51 153 153 153 52 151 151 151
-52 151 151 151 53 149 149 149
-53 149 149 149 54 147 147 147
-54 147 147 147 55 145 145 145
-55 145 145 145 56 143 143 143
-56 143 143 143 57 141 141 141
-57 141 141 141 58 139 139 139
-58 139 139 139 59 137 137 137
-59 137 137 137 60 135 135 135
-60 135 135 135 61 133 133 133
-61 133 133 133 62 131 131 131
-62 131 131 131 63 129 129 129
-63 129 129 129 64 127 127 127
-64 127 127 127 65 126 126 126
-65 126 126 126 66 124 124 124
-66 124 124 124 67 122 122 122
-67 122 122 122 68 120 120 120
-68 120 120 120 69 118 118 118
-69 118 118 118 70 116 116 116
-70 116 116 116 71 114 114 114
-71 114 114 114 72 112 112 112
-72 112 112 112 73 110 110 110
-73 110 110 110 74 108 108 108
-74 108 108 108 75 106 106 106
-75 106 106 106 76 104 104 104
-76 104 104 104 77 102 102 102
-77 102 102 102 78 100 100 100
-78 100 100 100 79 98 98 98
-79 98 98 98 80 96 96 96
-80 96 96 96 81 94 94 94
-81 94 94 94 82 92 92 92
-82 92 92 92 83 90 90 90
-83 90 90 90 84 88 88 88
-84 88 88 88 85 86 86 86
-85 86 86 86 86 84 84 84
-86 84 84 84 87 82 82 82
-87 82 82 82 88 80 80 80
-88 80 80 80 89 78 78 78
-89 78 78 78 90 76 76 76
-90 76 76 76 91 74 74 74
-91 74 74 74 92 72 72 72
-92 72 72 72 93 70 70 70
-93 70 70 70 94 68 68 68
-94 68 68 68 95 66 66 66
-95 66 66 66 96 64 64 64
-96 64 64 64 97 62 62 62
-97 62 62 62 98 60 60 60
-98 60 60 60 99 58 58 58
-99 58 58 58 100 56 56 56
-100 56 56 56 101 54 54 54
-101 54 54 54 102 52 52 52
-102 52 52 52 103 50 50 50
-103 50 50 50 104 48 48 48
-104 48 48 48 105 46 46 46
-105 46 46 46 106 44 44 44
-106 44 44 44 107 42 42 42
-107 42 42 42 108 40 40 40
-108 40 40 40 109 38 38 38
-109 38 38 38 110 36 36 36
-110 36 36 36 111 34 34 34
-111 34 34 34 112 32 32 32
-112 32 32 32 113 30 30 30
-113 30 30 30 114 28 28 28
-114 28 28 28 115 26 26 26
-115 26 26 26 116 24 24 24
-116 24 24 24 117 22 22 22
-117 22 22 22 118 20 20 20
-118 20 20 20 119 18 18 18
-119 18 18 18 120 16 16 16
-120 16 16 16 121 14 14 14
-121 14 14 14 122 12 12 12
-122 12 12 12 123 10 10 10
-123 10 10 10 124 8 8 8
-124 8 8 8 125 6 6 6
-125 6 6 6 126 4 4 4
-126 4 4 4 127 2 2 2
-127 2 2 2 128 0 0 0
-128 0 0 0 129 2 2 2
-129 2 2 2 130 4 4 4
-130 4 4 4 131 6 6 6
-131 6 6 6 132 8 8 8
-132 8 8 8 133 10 10 10
-133 10 10 10 134 12 12 12
-134 12 12 12 135 14 14 14
-135 14 14 14 136 16 16 16
-136 16 16 16 137 18 18 18
-137 18 18 18 138 20 20 20
-138 20 20 20 139 22 22 22
-139 22 22 22 140 24 24 24
-140 24 24 24 141 26 26 26
-141 26 26 26 142 28 28 28
-142 28 28 28 143 30 30 30
-143 30 30 30 144 32 32 32
-144 32 32 32 145 34 34 34
-145 34 34 34 146 36 36 36
-146 36 36 36 147 38 38 38
-147 38 38 38 148 40 40 40
-148 40 40 40 149 42 42 42
-149 42 42 42 150 44 44 44
-150 44 44 44 151 46 46 46
-151 46 46 46 152 48 48 48
-152 48 48 48 153 50 50 50
-153 50 50 50 154 52 52 52
-154 52 52 52 155 54 54 54
-155 54 54 54 156 56 56 56
-156 56 56 56 157 58 58 58
-157 58 58 58 158 60 60 60
-158 60 60 60 159 62 62 62
-159 62 62 62 160 64 64 64
-160 64 64 64 161 66 66 66
-161 66 66 66 162 68 68 68
-162 68 68 68 163 70 70 70
-163 70 70 70 164 72 72 72
-164 72 72 72 165 74 74 74
-165 74 74 74 166 76 76 76
-166 76 76 76 167 78 78 78
-167 78 78 78 168 80 80 80
-168 80 80 80 169 82 82 82
-169 82 82 82 170 84 84 84
-170 84 84 84 171 86 86 86
-171 86 86 86 172 88 88 88
-172 88 88 88 173 90 90 90
-173 90 90 90 174 92 92 92
-174 92 92 92 175 94 94 94
-175 94 94 94 176 96 96 96
-176 96 96 96 177 98 98 98
-177 98 98 98 178 100 100 100
-178 100 100 100 179 102 102 102
-179 102 102 102 180 104 104 104
-180 104 104 104 181 106 106 106
-181 106 106 106 182 108 108 108
-182 108 108 108 183 110 110 110
-183 110 110 110 184 112 112 112
-184 112 112 112 185 114 114 114
-185 114 114 114 186 116 116 116
-186 116 116 116 187 118 118 118
-187 118 118 118 188 120 120 120
-188 120 120 120 189 122 122 122
-189 122 122 122 190 124 124 124
-190 124 124 124 191 126 126 126
-191 126 126 126 192 129 129 129
-192 129 129 129 193 131 131 131
-193 131 131 131 194 133 133 133
-194 133 133 133 195 135 135 135
-195 135 135 135 196 137 137 137
-196 137 137 137 197 139 139 139
-197 139 139 139 198 141 141 141
-198 141 141 141 199 143 143 143
-199 143 143 143 200 145 145 145
-200 145 145 145 201 147 147 147
-201 147 147 147 202 149 149 149
-202 149 149 149 203 151 151 151
-203 151 151 151 204 153 153 153
-204 153 153 153 205 155 155 155
-205 155 155 155 206 157 157 157
-206 157 157 157 207 159 159 159
-207 159 159 159 208 161 161 161
-208 161 161 161 209 163 163 163
-209 163 163 163 210 165 165 165
-210 165 165 165 211 167 167 167
-211 167 167 167 212 169 169 169
-212 169 169 169 213 171 171 171
-213 171 171 171 214 173 173 173
-214 173 173 173 215 175 175 175
-215 175 175 175 216 177 177 177
-216 177 177 177 217 179 179 179
-217 179 179 179 218 181 181 181
-218 181 181 181 219 183 183 183
-219 183 183 183 220 185 185 185
-220 185 185 185 221 187 187 187
-221 187 187 187 222 189 189 189
-222 189 189 189 223 191 191 191
-223 191 191 191 224 193 193 193
-224 193 193 193 225 195 195 195
-225 195 195 195 226 197 197 197
-226 197 197 197 227 199 199 199
-227 199 199 199 228 201 201 201
-228 201 201 201 229 203 203 203
-229 203 203 203 230 205 205 205
-230 205 205 205 231 207 207 207
-231 207 207 207 232 209 209 209
-232 209 209 209 233 211 211 211
-233 211 211 211 234 213 213 213
-234 213 213 213 235 215 215 215
-235 215 215 215 236 217 217 217
-236 217 217 217 237 219 219 219
-237 219 219 219 238 221 221 221
-238 221 221 221 239 223 223 223
-239 223 223 223 240 225 225 225
-240 225 225 225 241 227 227 227
-241 227 227 227 242 229 229 229
-242 229 229 229 243 231 231 231
-243 231 231 231 244 233 233 233
-244 233 233 233 245 235 235 235
-245 235 235 235 246 237 237 237
-246 237 237 237 247 239 239 239
-247 239 239 239 248 241 241 241
-248 241 241 241 249 243 243 243
-249 243 243 243 250 245 245 245
-250 245 245 245 251 247 247 247
-251 247 247 247 252 249 249 249
-252 249 249 249 253 251 251 251
-253 251 251 251 254 253 253 253
-254 253 253 253 255 255 255 255
-B 0 0 0
-F 0 0 0
-N 0 0 0
Deleted: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_VTK.py
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_VTK.py 2012-06-04 18:12:05 UTC (rev 20301)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_VTK.py 2012-06-04 18:13:02 UTC (rev 20302)
@@ -1,116 +0,0 @@
-#!/usr/bin/env python
-#
-# creates a PNG file from a polygon data file *.vtk
-#
-from vtk import *
-import sys
-
-# input:
-if len(sys.argv) == 2:
- modelfile = str(sys.argv[1])
-else :
- print "Usage: python plot_VTK.py OUTPUT_FILES/bin_movie_009000.d.vtk"
- sys.exit(1)
-
-print "modelfile: ",modelfile
-
-
-# creates 2D projection view
-# graticule
-latLevel = 3
-lngLevel = 3
-pname = "eqc" # equidistant cylindrical (plate caree)
-pcs = vtkGeoProjection()
-pcs.SetName( pname )
-pcs.SetCentralMeridian( 0. )
-gcs = vtkGeoProjection()
-xfm = vtkGeoTransform()
-xfm.SetSourceProjection( gcs )
-xfm.SetDestinationProjection( pcs )
-
-# reads in polygon data
-model = vtkPolyDataReader()
-model.SetFileName(modelfile)
-model.Update()
-
-# Delaunay triangulation on data
-delaunay2D = vtkDelaunay2D()
-delaunay2D.SetInput( model.GetOutput() )
-delaunay2D.Update()
-print "delaunay : "
-print " points: ",delaunay2D.GetOutput().GetNumberOfPoints()
-print " polygons: ",delaunay2D.GetOutput().GetNumberOfPolys()
-
-xf3 = vtkTransformFilter()
-xf3.SetTransform( xfm )
-xf3.SetInputConnection( delaunay2D.GetOutputPort() )
-
-
-# coloring
-#output from: ./convert_cpt_lookuptable_python.bash blue_white_red.cpt
-colortable = vtkLookupTable()
-colortable.SetNumberOfTableValues(25)
-colortable.SetTableValue( 0 , 1 , 0.0392157 , 0.0392157 , 1.0 )
-colortable.SetTableValue( 1 , 1 , 0.121569 , 0.121569 , 0.878431 )
-colortable.SetTableValue( 2 , 1 , 0.2 , 0.2 , 0.8 )
-colortable.SetTableValue( 3 , 1 , 0.278431 , 0.278431 , 0.721569 )
-colortable.SetTableValue( 4 , 1 , 0.360784 , 0.360784 , 0.639216 )
-colortable.SetTableValue( 5 , 1 , 0.439216 , 0.439216 , 0.560784 )
-colortable.SetTableValue( 6 , 1 , 0.521569 , 0.521569 , 0.47451 )
-colortable.SetTableValue( 7 , 1 , 0.6 , 0.6 , 0.396078 )
-colortable.SetTableValue( 8 , 1 , 0.678431 , 0.678431 , 0.317647 )
-colortable.SetTableValue( 9 , 1 , 0.760784 , 0.760784 , 0.235294 )
-colortable.SetTableValue( 10 , 1 , 0.839216 , 0.839216 , 0.156863 )
-colortable.SetTableValue( 11 , 1 , 0.921569 , 0.921569 , 0.0745098 )
-colortable.SetTableValue( 12 , 0.996078 , 0.996078 , 0.996078 , 0.0 )
-colortable.SetTableValue( 13 , 0.921569 , 0.921569 , 1 , 0.0823529 )
-colortable.SetTableValue( 14 , 0.839216 , 0.839216 , 1 , 0.164706 )
-colortable.SetTableValue( 15 , 0.760784 , 0.760784 , 1 , 0.243137 )
-colortable.SetTableValue( 16 , 0.678431 , 0.678431 , 1 , 0.32549 )
-colortable.SetTableValue( 17 , 0.6 , 0.6 , 1 , 0.403922 )
-colortable.SetTableValue( 18 , 0.521569 , 0.521569 , 1 , 0.482353 )
-colortable.SetTableValue( 19 , 0.439216 , 0.439216 , 1 , 0.560784 )
-colortable.SetTableValue( 20 , 0.360784 , 0.360784 , 1 , 0.639216 )
-colortable.SetTableValue( 21 , 0.278431 , 0.278431 , 1 , 0.721569 )
-colortable.SetTableValue( 22 , 0.2 , 0.2 , 1 , 0.8 )
-colortable.SetTableValue( 23 , 0.121569 , 0.121569 , 1 , 0.878431 )
-colortable.SetTableValue( 24 , 0.0392157 , 0.0392157 , 1 , 1.0 )
-colortable.SetTableRange(0.0,255.0)
-
-# creates new actor based on PolyData mapper
-mapper3 = vtkPolyDataMapper()
-mapper3.SetInputConnection( xf3.GetOutputPort() )
-mapper3.SetScalarRange(0.0,255.0)
-mapper3.ColorArrayName= "displacement"
-mapper3.ColorAttributeType= 0
-mapper3.SetLookupTable( colortable )
-
-actor3 = vtkActor()
-actor3.SetMapper( mapper3 )
-
-
-# view rendering
-ren = vtkRenderer()
-ren.AddActor( actor3 )
-ren.SetBackground(0,0,0) # black
-
-window = vtkRenderWindow()
-window.SetMultiSamples(0)
-window.AddRenderer( ren )
-window.SetSize(1000, 500)
-window.OffScreenRenderingOn()
-
-ren.ResetCamera()
-ren.GetActiveCamera().Zoom(2.2)
-window.Render()
-
-# writes png images
-windowToImage = vtkWindowToImageFilter()
-windowToImage.SetInput(window)
-PNGWriter = vtkPNGWriter()
-PNGWriter.SetInputConnection( windowToImage.GetOutputPort() )
-PNGWriter.SetFileName("bin_color.png")
-PNGWriter.Write()
-
-#window.GetInteractor().Initialize()
-#window.GetInteractor().Start()
Deleted: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_VTK_gray.py
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_VTK_gray.py 2012-06-04 18:12:05 UTC (rev 20301)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_VTK_gray.py 2012-06-04 18:13:02 UTC (rev 20302)
@@ -1,117 +0,0 @@
-#!/usr/bin/env python
-#
-# creates a (gray-scale) PNG file from a polygon data file *.vtk
-#
-from vtk import *
-import sys
-
-# input:
-if len(sys.argv) == 2:
- modelfile = str(sys.argv[1])
-else :
- print "Usage: python plot_VTK_gray.py OUTPUT_FILES/bin_movie_009000.d.vtk"
- sys.exit(1)
-
-print "modelfile: ",modelfile
-
-
-# creates 2D projection view
-# graticule
-latLevel = 3
-lngLevel = 3
-pname = "eqc" # equidistant cylindrical (plate caree)
-pcs = vtkGeoProjection()
-pcs.SetName( pname )
-pcs.SetCentralMeridian( 0. )
-gcs = vtkGeoProjection()
-xfm = vtkGeoTransform()
-xfm.SetSourceProjection( gcs )
-xfm.SetDestinationProjection( pcs )
-
-# reads in polygon data
-model = vtkPolyDataReader()
-model.SetFileName(modelfile)
-model.Update()
-
-# Delaunay triangulation on data
-delaunay2D = vtkDelaunay2D()
-delaunay2D.SetInput( model.GetOutput() )
-delaunay2D.Update()
-print "delaunay : "
-print " points: ",delaunay2D.GetOutput().GetNumberOfPoints()
-print " polygons: ",delaunay2D.GetOutput().GetNumberOfPolys()
-
-xf3 = vtkTransformFilter()
-xf3.SetTransform( xfm )
-xf3.SetInputConnection( delaunay2D.GetOutputPort() )
-
-
-# coloring
-#output from: ./convert_cpt_lookuptable_python.bash gray_pyramid_inv.cpt
-colortable = vtkLookupTable()
-colortable.SetNumberOfTableValues(25)
-colortable.SetTableValue( 0 , 1.0 , 1.0 , 1.0 , 1 )
-colortable.SetTableValue( 1 , 0.878431 , 0.878431 , 0.878431 , 1 )
-colortable.SetTableValue( 2 , 0.8 , 0.8 , 0.8 , 1 )
-colortable.SetTableValue( 3 , 0.721569 , 0.721569 , 0.721569 , 1 )
-colortable.SetTableValue( 4 , 0.639216 , 0.639216 , 0.639216 , 1 )
-colortable.SetTableValue( 5 , 0.560784 , 0.560784 , 0.560784 , 1 )
-colortable.SetTableValue( 6 , 0.47451 , 0.47451 , 0.47451 , 1 )
-colortable.SetTableValue( 7 , 0.396078 , 0.396078 , 0.396078 , 1 )
-colortable.SetTableValue( 8 , 0.317647 , 0.317647 , 0.317647 , 1 )
-colortable.SetTableValue( 9 , 0.235294 , 0.235294 , 0.235294 , 1 )
-colortable.SetTableValue( 10 , 0.156863 , 0.156863 , 0.156863 , 1 )
-colortable.SetTableValue( 11 , 0.0745098 , 0.0745098 , 0.0745098 , 1 )
-colortable.SetTableValue( 12 , 0.00392157 , 0.00392157 , 0.00392157 , 1 )
-colortable.SetTableValue( 13 , 0.0823529 , 0.0823529 , 0.0823529 , 1 )
-colortable.SetTableValue( 14 , 0.164706 , 0.164706 , 0.164706 , 1 )
-colortable.SetTableValue( 15 , 0.243137 , 0.243137 , 0.243137 , 1 )
-colortable.SetTableValue( 16 , 0.32549 , 0.32549 , 0.32549 , 1 )
-colortable.SetTableValue( 17 , 0.403922 , 0.403922 , 0.403922 , 1 )
-colortable.SetTableValue( 18 , 0.482353 , 0.482353 , 0.482353 , 1 )
-colortable.SetTableValue( 19 , 0.560784 , 0.560784 , 0.560784 , 1 )
-colortable.SetTableValue( 20 , 0.639216 , 0.639216 , 0.639216 , 1 )
-colortable.SetTableValue( 21 , 0.721569 , 0.721569 , 0.721569 , 1 )
-colortable.SetTableValue( 22 , 0.8 , 0.8 , 0.8 , 1 )
-colortable.SetTableValue( 23 , 0.878431 , 0.878431 , 0.878431 , 1 )
-colortable.SetTableValue( 24 , 1.0 , 1.0 , 1.0 , 1 )
-colortable.SetTableRange(0.0,255.0)
-
-
-# creates new actor based on PolyData mapper
-mapper3 = vtkPolyDataMapper()
-mapper3.SetInputConnection( xf3.GetOutputPort() )
-mapper3.SetScalarRange(0.0,255.0)
-mapper3.ColorArrayName= "displacement"
-mapper3.ColorAttributeType= 0
-mapper3.SetLookupTable( colortable )
-
-actor3 = vtkActor()
-actor3.SetMapper( mapper3 )
-
-
-# view rendering
-ren = vtkRenderer()
-ren.AddActor( actor3 )
-ren.SetBackground(0,0,0) # black
-
-window = vtkRenderWindow()
-window.SetMultiSamples(0)
-window.AddRenderer( ren )
-window.SetSize(1000, 500)
-window.OffScreenRenderingOn()
-
-ren.ResetCamera()
-ren.GetActiveCamera().Zoom(2.2)
-window.Render()
-
-# writes png images
-windowToImage = vtkWindowToImageFilter()
-windowToImage.SetInput(window)
-PNGWriter = vtkPNGWriter()
-PNGWriter.SetInputConnection( windowToImage.GetOutputPort() )
-PNGWriter.SetFileName("bin_mask.png")
-PNGWriter.Write()
-
-#window.GetInteractor().Initialize()
-#window.GetInteractor().Start()
Deleted: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_movie_GMT_binary_VTK.pl
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_movie_GMT_binary_VTK.pl 2012-06-04 18:12:05 UTC (rev 20301)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_movie_GMT_binary_VTK.pl 2012-06-04 18:13:02 UTC (rev 20302)
@@ -1,281 +0,0 @@
-#!/usr/bin/perl -W
-#
-# reads in binary files produced from xcreate_movie_GMT_global
-# and creates png files with transparency
-#
-# uses segmented M-file to plot with psxy
-#
-
-use Getopt::Std;
-use POSIX;
-
-sub Usage {
- print STDERR <<EOF;
-
-Usage: plot_movie_GMT_binary_VTK.pl file_name
-
- ex. ./plot_movie_GMT_binary_VTK.pl OUTPUT_FILES/bin_movie_00***.d
-
-EOF
-exit(1)
-}
-
-if (!getopts('l:L:cdts')) {die('Check input arguments\n');}
- at ARGV > 0 or Usage();
-
-
-#######################################################
-## PARAMETERS
-
-# specfem3D Par_file settings
-$nex = 160;
-$nproc = 5;
-$nchunks = 6;
-
-# gunzipped files (ending .gz)
-$gzipped = 0;
-
-# point locations
-$xy_file = "OUTPUT_FILES/bin_movie.xy";
-
-# non-linear scaling
-$power_scaling = 0.5;
-
-
-#######################################################
-
-
-# gunzips location file
-if( $gzipped == 1 ){
- system("cp -v $xy_file.gz $xy_file.gz.org");
- system("gunzip -f $xy_file.gz");
-}
-
-print "Processing locations: $xy_file\n";
-
-(@lines) = read_binary_file_locations($xy_file);
-$nlines = @lines;
-print " number of lines: $nlines\n\n";
-
-# restore gzipped file
-if( $gzipped == 1 ) {system("mv $xy_file.gz.org $xy_file.gz");}
-
-open(CSH,">plot_movie.csh");
-
-
-foreach $file (@ARGV) {
-
- if (not -f $file) {die("No $file\n");}
-
- print "Processing frame $file...\n";
-
- # gunzips data file
- if( $gzipped == 1 ){
- $filegz = $file;
- $file = substr($file,0,length($filegz)-3);
- system("cp $filegz $filegz.org");
- system("gunzip -f $filegz");
- }
- print " $file\n";
-
- # reads displacement file (binary data)
- (@lines_f) = read_binary_file_data($file);
- $nlines_f = @lines_f;
-
- # restore gzipped file
- if( $gzipped == 1 ) {system("mv $filegz.org $filegz");}
-
- if ($nlines_f != $nlines) {die("number of lines differ\n");}
-
-
- # non-linear scaling of displacement data and min/max
- $min = 1.e30;
- $max = -1.e30;
- for($i=0;$i<$nlines;$i++){
- # scale between 0,1
- $val = $lines_f[$i];
- if( $power_scaling > 0 ) {
- if( $val > 0 ){
- $val = $val**$power_scaling;
- }else{
- $val = - abs($val)**$power_scaling;
- }
- }
- # determines min/max of displacements
- if( $val < $min) {$min = $val;}
- if( $val > $max) {$max = $val;}
- $lines_f[$i] = $val;
- }
- if( abs($min) > abs($max) ){$max = abs($min);}
-
- # writes out segment file
- open VTKFILE, ">$file.vtk" or die $!;
- print VTKFILE "# vtk DataFile Version 3.1\n";
- print VTKFILE "specfem3D_data\n";
- print VTKFILE "ASCII\n";
- print VTKFILE "DATASET POLYDATA\n";
- print VTKFILE "POINTS $nlines float\n";
-
- @elem_val = ();
- for($i=0;$i<$nlines;$i++){
- # scale between 0,1
- $val = ($lines_f[$i] + $max)/(2.0*$max);
- # scale between 0, 255
- $val = $val * 255.0;
-
- # prints value together with coordinates
- $coord = $lines[$i];
- chomp($coord);
-
- # adds point: uses lon, lat and 0 (flat earth file)
- print VTKFILE "$coord 0.0 \n";
-
- # stores values in arrays
- push(@elem_val, $val );
- }
- print VTKFILE "\n";
-
-
- # specfem3D output for MOVIE_COARSE
- $nex_per_proc = $nex / $nproc ;
- $total = $nproc * $nex_per_proc * $nproc * $nex_per_proc * $nchunks;
- if( $total != $nlines ){ die("error nex/proc $nlines $total");}
-
- $npoly = $nproc * $nproc* $nchunks * ($nex_per_proc-1) * ($nex_per_proc-1);
- print VTKFILE "POLYGONS $npoly ",$npoly*5," \n";
- $count = 0;
- for($n=0;$n<$nproc*$nproc*$nchunks;$n++){
- for($m=0;$m<$nex_per_proc-1;$m++){
- for ($k=0;$k<$nex_per_proc-1;$k++){
- # global array index
- $i = $k + $m*$nex_per_proc + $n*$nex_per_proc*$nex_per_proc;
-
- # adds element
- print VTKFILE "4 ",$i," ",$i+1," ",$i+$nex_per_proc+1," ",$i+$nex_per_proc," \n";
- $count++;
- }
- }
- }
- print VTKFILE "\n";
-
- print "count: $count \n";
-
- print VTKFILE "POINT_DATA $nlines \n";
- print VTKFILE "SCALARS displacement float\n";
- print VTKFILE "LOOKUP_TABLE default\n";
- for($i=0;$i<$nlines;$i++){
- $val = $elem_val[$i];
- print VTKFILE "$val \n";
- }
- print VTKFILE "\n";
- close(VTKFILE);
-
- # creates png files
- #print CSH "python plot_VTKdisp.py $file.vtk \n";
- #print CSH "python plot_VTKdisp_gray.py $file.vtk \n";
- #print CSH "mv bin_disp.png $file.disp.png \n";
- #print CSH "mv bin_mask.png $file.mask.png \n";
-
- # creates file with transparency (opacity)
- #print CSH "composite -compose CopyOpacity $file.mask.png $file.disp.png $file.png\n";
-
- print CSH "echo \n";
- print CSH "echo 'plotted: $file.png' \n";
- print CSH "echo \n";
-
-}
-close(CSH);
-
-print "\nplotting... \n\n";
-
-system("csh -f plot_movie.csh");
-
-system("rm -f plot_movie.csh");
-
-#-------------------------------------------------------------
-
-sub read_binary_file_locations{
-
- my($xy_file) = @_;
- my(@return_lines);
- my(@lines,$line,$is_ok,$junk,$n1,$n2,$data1,$data2);
-
- # reads in locations (binary data)
- open FILE, "$xy_file" or die $!;
- binmode FILE;
-
- @lines= () ;
- $line="";
- $is_ok = 1;
- while ( $is_ok != 0) {
- read FILE, $junk, 4;
-
- $n1 = read FILE, $data1, 4;
- if( $n1 != 0 ){
- ($lon) = unpack( "f",$data1);
- }
- $n2 = read FILE, $data2, 4;
- if( $n2 != 0 ){
- ($lat) = unpack( "f",$data2);
- }
- read FILE, $junk, 4;
-
- #print "$n1 $n2 bytes read: lon=$lon \t \t lat=$lat\n";
-
- if( $n1 != 0 && $n2 != 0 ){
- $line = "$lon $lat \n";
- push(@lines, $line);
- $is_ok = 1;
- }
- else{ $is_ok = 0;}
-
- }
- close(FILE);
-
- @return_lines = @lines;
- return @return_lines;
-
-}
-
-
-#-------------------------------------------------------------
-
-sub read_binary_file_data{
-
- my($file) = @_;
- my(@return_lines_f);
- my(@lines_f,$is_ok,$junk,$n1,$data1);
-
- open FILE, "$file" or die $!;
- binmode FILE;
-
- @lines_f = () ;
- $line = "";
- $is_ok = 1;
- while ( $is_ok != 0) {
- read FILE, $junk, 4;
-
- $n1 = read FILE, $data1, 4;
- if( $n1 != 0 ){
- ($val) = unpack( "f",$data1);
- }
-
- read FILE, $junk, 4;
-
- #print "$n1 bytes read: value=$val \n";
-
- if( $n1 != 0 ){
- $line = "$val \n";
- push(@lines_f, $line);
- $is_ok = 1;
- }
- else{ $is_ok = 0;}
- }
- close(FILE);
-
- @return_lines_f = @lines_f;
- return @return_lines_f;
-
-}
-
-#-------------------------------------------------------------
Deleted: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/readme.txt
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/readme.txt 2012-06-04 18:12:05 UTC (rev 20301)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/readme.txt 2012-06-04 18:13:02 UTC (rev 20302)
@@ -1,115 +0,0 @@
---------------------------------
-readme
---------------------------------
-
-VTK, The Visualization Toolkit
-http://www.vtk.org/
-
-
-
-- procedure to make a PNG image (flat earth):
-
-------------------
-NOTE: this requires VTK to be installed and compiled with python wrappers
- see small howto note below.
-------------------
-
-
-1. run specfem with the movie options (see Par_file):
-
- MOVIE_SURFACE = .true.
- MOVIE_COARSE = .false.
-
- and adjust the time steps NSTEP_BETWEEN_FRAMES
-
- this creates binary files in directory OUTPUT_FILES/ like: moviedata000100,...
-
-
-2. convert binary files to GMT-files:
-
- in SPECFEM3D_GLOBE: > make xcreate_movie_GMT_global
-
- run it > ./xcreate_movie_GMT_global
-
- choose option for binary (T)
- to create individual files
-
-
-3. create VTK files:
-
- > ./plot_movie_GMT_binary_VTK.pl OUTPUT_FILES/bin_movie_00***.d
-
-
-4. render VTK files to create a PNG image:
-
- for each single file:
-
- > python plot_VTK.py OUTPUT_FILES/bin_movie_009000.d.vtk
-
- this creates a single PNG image 'bin_color.png'
-
-
-optional, to add transparency:
-
- a) create a color image:
-
- > python plot_VTK.py OUTPUT_FILES/bin_movie_009000.d.vtk
-
- and a gray-scale image:
-
- > python plot_VTK_gray.py OUTPUT_FILES/bin_movie_009000.d.vtk
-
-
- b) use the gray-scale image as alpha channel in the new file to
- create a file with transparency (opacity):
-
- > composite -compose CopyOpacity bin_mask.png bin_color.png bin_image.png
-
- this requires software installed from ImageMagick
- ( http://www.imagemagick.org/ )
-
-
-
-------------------
-VTK installation - python wrapper:
-------------------
-
- download sources from:
- http://www.vtk.org/VTK/resources/software.html
-
- install with python wrappers and Geovis for example in /opt/vtk-5.4.2:
- > cd /opt/vtk-5.4.2
- > tar -xvf vtk-5.4.2.tar
- > cd VTK
- > ccmake .
-
- turn on options: BUILD_SHARED_LIBS ON
- CMAKE_INSTALL_PREFIX /opt/vtk-5.4.2
- VTK_USE_GEOVIS ON
- VTK_WRAP_PYTHON ON
- > make
- > make install
-
- export your python path specifics for example in ~/.bashrc:
-
- # vtk python
- export PYTHONPATH=$PYTHONPATH:/opt/vtk-5.4.2/VTK/bin
- export PYTHONPATH=$PYTHONPATH:/opt/vtk-5.4.2/VTK/Wrapping/Python/
- export PATH=$PATH:/opt/vtk-5.4.2/VTK/bin
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/vtk-5.4.2/VTK/lib/
-
- check if properly installed:
- > cd ~/SPECFEM3D_GLOBE/UTILS/VTK
- > python
-
- >>> from vtk import *
- >>> gs = vtkGeoProjection()
-
- if any of this fails, check your path default settings:
-
- >>> import sys
- >>> sys.path
-
- and fix the paths in your ~/.bashrc
-
-
\ No newline at end of file
Copied: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/bin_image.png (from rev 20300, seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/bin_image.png)
===================================================================
(Binary files differ)
Copied: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/blue_white_red.cpt (from rev 20300, seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/blue_white_red.cpt)
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/blue_white_red.cpt (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/blue_white_red.cpt 2012-06-04 18:13:02 UTC (rev 20302)
@@ -0,0 +1,261 @@
+# cpt file created by: makecpt -V -Cpolar -T0/255/1 -Z
+#COLOR_MODEL = RGB
+#
+0 0 0 255 1 2 2 255
+1 2 2 255 2 4 4 255
+2 4 4 255 3 6 6 255
+3 6 6 255 4 8 8 255
+4 8 8 255 5 10 10 255
+5 10 10 255 6 12 12 255
+6 12 12 255 7 14 14 255
+7 14 14 255 8 16 16 255
+8 16 16 255 9 18 18 255
+9 18 18 255 10 20 20 255
+10 20 20 255 11 22 22 255
+11 22 22 255 12 24 24 255
+12 24 24 255 13 26 26 255
+13 26 26 255 14 28 28 255
+14 28 28 255 15 30 30 255
+15 30 30 255 16 32 32 255
+16 32 32 255 17 34 34 255
+17 34 34 255 18 36 36 255
+18 36 36 255 19 38 38 255
+19 38 38 255 20 40 40 255
+20 40 40 255 21 42 42 255
+21 42 42 255 22 44 44 255
+22 44 44 255 23 46 46 255
+23 46 46 255 24 48 48 255
+24 48 48 255 25 50 50 255
+25 50 50 255 26 52 52 255
+26 52 52 255 27 54 54 255
+27 54 54 255 28 56 56 255
+28 56 56 255 29 58 58 255
+29 58 58 255 30 60 60 255
+30 60 60 255 31 62 62 255
+31 62 62 255 32 64 64 255
+32 64 64 255 33 66 66 255
+33 66 66 255 34 68 68 255
+34 68 68 255 35 70 70 255
+35 70 70 255 36 72 72 255
+36 72 72 255 37 74 74 255
+37 74 74 255 38 76 76 255
+38 76 76 255 39 78 78 255
+39 78 78 255 40 80 80 255
+40 80 80 255 41 82 82 255
+41 82 82 255 42 84 84 255
+42 84 84 255 43 86 86 255
+43 86 86 255 44 88 88 255
+44 88 88 255 45 90 90 255
+45 90 90 255 46 92 92 255
+46 92 92 255 47 94 94 255
+47 94 94 255 48 96 96 255
+48 96 96 255 49 98 98 255
+49 98 98 255 50 100 100 255
+50 100 100 255 51 102 102 255
+51 102 102 255 52 104 104 255
+52 104 104 255 53 106 106 255
+53 106 106 255 54 108 108 255
+54 108 108 255 55 110 110 255
+55 110 110 255 56 112 112 255
+56 112 112 255 57 114 114 255
+57 114 114 255 58 116 116 255
+58 116 116 255 59 118 118 255
+59 118 118 255 60 120 120 255
+60 120 120 255 61 122 122 255
+61 122 122 255 62 124 124 255
+62 124 124 255 63 126 126 255
+63 126 126 255 64 128 128 255
+64 128 128 255 65 130 130 255
+65 130 130 255 66 132 132 255
+66 132 132 255 67 134 134 255
+67 134 134 255 68 136 136 255
+68 136 136 255 69 138 138 255
+69 138 138 255 70 140 140 255
+70 140 140 255 71 142 142 255
+71 142 142 255 72 144 144 255
+72 144 144 255 73 146 146 255
+73 146 146 255 74 148 148 255
+74 148 148 255 75 150 150 255
+75 150 150 255 76 152 152 255
+76 152 152 255 77 154 154 255
+77 154 154 255 78 156 156 255
+78 156 156 255 79 158 158 255
+79 158 158 255 80 160 160 255
+80 160 160 255 81 162 162 255
+81 162 162 255 82 164 164 255
+82 164 164 255 83 166 166 255
+83 166 166 255 84 168 168 255
+84 168 168 255 85 170 170 255
+85 170 170 255 86 172 172 255
+86 172 172 255 87 174 174 255
+87 174 174 255 88 176 176 255
+88 176 176 255 89 178 178 255
+89 178 178 255 90 180 180 255
+90 180 180 255 91 182 182 255
+91 182 182 255 92 184 184 255
+92 184 184 255 93 186 186 255
+93 186 186 255 94 188 188 255
+94 188 188 255 95 190 190 255
+95 190 190 255 96 192 192 255
+96 192 192 255 97 194 194 255
+97 194 194 255 98 196 196 255
+98 196 196 255 99 198 198 255
+99 198 198 255 100 200 200 255
+100 200 200 255 101 202 202 255
+101 202 202 255 102 204 204 255
+102 204 204 255 103 206 206 255
+103 206 206 255 104 208 208 255
+104 208 208 255 105 210 210 255
+105 210 210 255 106 212 212 255
+106 212 212 255 107 214 214 255
+107 214 214 255 108 216 216 255
+108 216 216 255 109 218 218 255
+109 218 218 255 110 220 220 255
+110 220 220 255 111 222 222 255
+111 222 222 255 112 224 224 255
+112 224 224 255 113 226 226 255
+113 226 226 255 114 228 228 255
+114 228 228 255 115 230 230 255
+115 230 230 255 116 232 232 255
+116 232 232 255 117 234 234 255
+117 234 234 255 118 236 236 255
+118 236 236 255 119 238 238 255
+119 238 238 255 120 240 240 255
+120 240 240 255 121 242 242 255
+121 242 242 255 122 244 244 255
+122 244 244 255 123 246 246 255
+123 246 246 255 124 248 248 255
+124 248 248 255 125 250 250 255
+125 250 250 255 126 252 252 255
+126 252 252 255 127 254 254 255
+127 254 254 254 128 254 254 254
+128 255 254 254 129 255 252 252
+129 255 252 252 130 255 250 250
+130 255 250 250 131 255 248 248
+131 255 248 248 132 255 246 246
+132 255 246 246 133 255 244 244
+133 255 244 244 134 255 242 242
+134 255 242 242 135 255 240 240
+135 255 240 240 136 255 238 238
+136 255 238 238 137 255 236 236
+137 255 236 236 138 255 234 234
+138 255 234 234 139 255 232 232
+139 255 232 232 140 255 230 230
+140 255 230 230 141 255 228 228
+141 255 228 228 142 255 226 226
+142 255 226 226 143 255 224 224
+143 255 224 224 144 255 222 222
+144 255 222 222 145 255 220 220
+145 255 220 220 146 255 218 218
+146 255 218 218 147 255 216 216
+147 255 216 216 148 255 214 214
+148 255 214 214 149 255 212 212
+149 255 212 212 150 255 210 210
+150 255 210 210 151 255 208 208
+151 255 208 208 152 255 206 206
+152 255 206 206 153 255 204 204
+153 255 204 204 154 255 202 202
+154 255 202 202 155 255 200 200
+155 255 200 200 156 255 198 198
+156 255 198 198 157 255 196 196
+157 255 196 196 158 255 194 194
+158 255 194 194 159 255 192 192
+159 255 192 192 160 255 190 190
+160 255 190 190 161 255 188 188
+161 255 188 188 162 255 186 186
+162 255 186 186 163 255 184 184
+163 255 184 184 164 255 182 182
+164 255 182 182 165 255 180 180
+165 255 180 180 166 255 178 178
+166 255 178 178 167 255 176 176
+167 255 176 176 168 255 174 174
+168 255 174 174 169 255 172 172
+169 255 172 172 170 255 170 170
+170 255 170 170 171 255 168 168
+171 255 168 168 172 255 166 166
+172 255 166 166 173 255 164 164
+173 255 164 164 174 255 162 162
+174 255 162 162 175 255 160 160
+175 255 160 160 176 255 158 158
+176 255 158 158 177 255 156 156
+177 255 156 156 178 255 154 154
+178 255 154 154 179 255 152 152
+179 255 152 152 180 255 150 150
+180 255 150 150 181 255 148 148
+181 255 148 148 182 255 146 146
+182 255 146 146 183 255 144 144
+183 255 144 144 184 255 142 142
+184 255 142 142 185 255 140 140
+185 255 140 140 186 255 138 138
+186 255 138 138 187 255 136 136
+187 255 136 136 188 255 134 134
+188 255 134 134 189 255 132 132
+189 255 132 132 190 255 130 130
+190 255 130 130 191 255 128 128
+191 255 128 128 192 255 126 126
+192 255 126 126 193 255 124 124
+193 255 124 124 194 255 122 122
+194 255 122 122 195 255 120 120
+195 255 120 120 196 255 118 118
+196 255 118 118 197 255 116 116
+197 255 116 116 198 255 114 114
+198 255 114 114 199 255 112 112
+199 255 112 112 200 255 110 110
+200 255 110 110 201 255 108 108
+201 255 108 108 202 255 106 106
+202 255 106 106 203 255 104 104
+203 255 104 104 204 255 102 102
+204 255 102 102 205 255 100 100
+205 255 100 100 206 255 98 98
+206 255 98 98 207 255 96 96
+207 255 96 96 208 255 94 94
+208 255 94 94 209 255 92 92
+209 255 92 92 210 255 90 90
+210 255 90 90 211 255 88 88
+211 255 88 88 212 255 86 86
+212 255 86 86 213 255 84 84
+213 255 84 84 214 255 82 82
+214 255 82 82 215 255 80 80
+215 255 80 80 216 255 78 78
+216 255 78 78 217 255 76 76
+217 255 76 76 218 255 74 74
+218 255 74 74 219 255 72 72
+219 255 72 72 220 255 70 70
+220 255 70 70 221 255 68 68
+221 255 68 68 222 255 66 66
+222 255 66 66 223 255 64 64
+223 255 64 64 224 255 62 62
+224 255 62 62 225 255 60 60
+225 255 60 60 226 255 58 58
+226 255 58 58 227 255 56 56
+227 255 56 56 228 255 54 54
+228 255 54 54 229 255 52 52
+229 255 52 52 230 255 50 50
+230 255 50 50 231 255 48 48
+231 255 48 48 232 255 46 46
+232 255 46 46 233 255 44 44
+233 255 44 44 234 255 42 42
+234 255 42 42 235 255 40 40
+235 255 40 40 236 255 38 38
+236 255 38 38 237 255 36 36
+237 255 36 36 238 255 34 34
+238 255 34 34 239 255 32 32
+239 255 32 32 240 255 30 30
+240 255 30 30 241 255 28 28
+241 255 28 28 242 255 26 26
+242 255 26 26 243 255 24 24
+243 255 24 24 244 255 22 22
+244 255 22 22 245 255 20 20
+245 255 20 20 246 255 18 18
+246 255 18 18 247 255 16 16
+247 255 16 16 248 255 14 14
+248 255 14 14 249 255 12 12
+249 255 12 12 250 255 10 10
+250 255 10 10 251 255 8 8
+251 255 8 8 252 255 6 6
+252 255 6 6 253 255 4 4
+253 255 4 4 254 255 2 2
+254 255 2 2 255 255 0 0
+B 0 0 0
+F 0 0 0
+N 0 0 0
Copied: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/convert_cpt_lookuptable_python.bash (from rev 20300, seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/convert_cpt_lookuptable_python.bash)
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/convert_cpt_lookuptable_python.bash (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/convert_cpt_lookuptable_python.bash 2012-06-04 18:13:02 UTC (rev 20302)
@@ -0,0 +1,15 @@
+#!/bin/bash
+#
+# based on GMT makecpt
+#
+if [ $# -eq 0 ]; then
+ echo "convert_cpt_lookuptable.bash cpt_name_from_gmt (no_green,seis,etc)"
+ exit
+fi
+
+cpt=$1
+ncolors=25
+echo "colortable.SetNumberOfTableValues($ncolors)"
+makecpt -C$cpt -I -T0/$ncolors/1 > temp.cpt
+nline=`wc temp.cpt | awk '{print $1}'`
+awk 'NR > 3 && NR < '$nline'-2 {print "colortable.SetTableValue( ",NR-4,",",$2/255,",",$3/255,",",$4/255,",",1.0,")"}' temp.cpt
Copied: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/gray_pyramid_inv.cpt (from rev 20300, seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/gray_pyramid_inv.cpt)
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/gray_pyramid_inv.cpt (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/gray_pyramid_inv.cpt 2012-06-04 18:13:02 UTC (rev 20302)
@@ -0,0 +1,261 @@
+# cpt file created by: makecpt -V -I -Cgray -T0/128/1 -Z
+#COLOR_MODEL = RGB
+#
+0 255 255 255 1 253 253 253
+1 253 253 253 2 251 251 251
+2 251 251 251 3 249 249 249
+3 249 249 249 4 247 247 247
+4 247 247 247 5 245 245 245
+5 245 245 245 6 243 243 243
+6 243 243 243 7 241 241 241
+7 241 241 241 8 239 239 239
+8 239 239 239 9 237 237 237
+9 237 237 237 10 235 235 235
+10 235 235 235 11 233 233 233
+11 233 233 233 12 231 231 231
+12 231 231 231 13 229 229 229
+13 229 229 229 14 227 227 227
+14 227 227 227 15 225 225 225
+15 225 225 225 16 223 223 223
+16 223 223 223 17 221 221 221
+17 221 221 221 18 219 219 219
+18 219 219 219 19 217 217 217
+19 217 217 217 20 215 215 215
+20 215 215 215 21 213 213 213
+21 213 213 213 22 211 211 211
+22 211 211 211 23 209 209 209
+23 209 209 209 24 207 207 207
+24 207 207 207 25 205 205 205
+25 205 205 205 26 203 203 203
+26 203 203 203 27 201 201 201
+27 201 201 201 28 199 199 199
+28 199 199 199 29 197 197 197
+29 197 197 197 30 195 195 195
+30 195 195 195 31 193 193 193
+31 193 193 193 32 191 191 191
+32 191 191 191 33 189 189 189
+33 189 189 189 34 187 187 187
+34 187 187 187 35 185 185 185
+35 185 185 185 36 183 183 183
+36 183 183 183 37 181 181 181
+37 181 181 181 38 179 179 179
+38 179 179 179 39 177 177 177
+39 177 177 177 40 175 175 175
+40 175 175 175 41 173 173 173
+41 173 173 173 42 171 171 171
+42 171 171 171 43 169 169 169
+43 169 169 169 44 167 167 167
+44 167 167 167 45 165 165 165
+45 165 165 165 46 163 163 163
+46 163 163 163 47 161 161 161
+47 161 161 161 48 159 159 159
+48 159 159 159 49 157 157 157
+49 157 157 157 50 155 155 155
+50 155 155 155 51 153 153 153
+51 153 153 153 52 151 151 151
+52 151 151 151 53 149 149 149
+53 149 149 149 54 147 147 147
+54 147 147 147 55 145 145 145
+55 145 145 145 56 143 143 143
+56 143 143 143 57 141 141 141
+57 141 141 141 58 139 139 139
+58 139 139 139 59 137 137 137
+59 137 137 137 60 135 135 135
+60 135 135 135 61 133 133 133
+61 133 133 133 62 131 131 131
+62 131 131 131 63 129 129 129
+63 129 129 129 64 127 127 127
+64 127 127 127 65 126 126 126
+65 126 126 126 66 124 124 124
+66 124 124 124 67 122 122 122
+67 122 122 122 68 120 120 120
+68 120 120 120 69 118 118 118
+69 118 118 118 70 116 116 116
+70 116 116 116 71 114 114 114
+71 114 114 114 72 112 112 112
+72 112 112 112 73 110 110 110
+73 110 110 110 74 108 108 108
+74 108 108 108 75 106 106 106
+75 106 106 106 76 104 104 104
+76 104 104 104 77 102 102 102
+77 102 102 102 78 100 100 100
+78 100 100 100 79 98 98 98
+79 98 98 98 80 96 96 96
+80 96 96 96 81 94 94 94
+81 94 94 94 82 92 92 92
+82 92 92 92 83 90 90 90
+83 90 90 90 84 88 88 88
+84 88 88 88 85 86 86 86
+85 86 86 86 86 84 84 84
+86 84 84 84 87 82 82 82
+87 82 82 82 88 80 80 80
+88 80 80 80 89 78 78 78
+89 78 78 78 90 76 76 76
+90 76 76 76 91 74 74 74
+91 74 74 74 92 72 72 72
+92 72 72 72 93 70 70 70
+93 70 70 70 94 68 68 68
+94 68 68 68 95 66 66 66
+95 66 66 66 96 64 64 64
+96 64 64 64 97 62 62 62
+97 62 62 62 98 60 60 60
+98 60 60 60 99 58 58 58
+99 58 58 58 100 56 56 56
+100 56 56 56 101 54 54 54
+101 54 54 54 102 52 52 52
+102 52 52 52 103 50 50 50
+103 50 50 50 104 48 48 48
+104 48 48 48 105 46 46 46
+105 46 46 46 106 44 44 44
+106 44 44 44 107 42 42 42
+107 42 42 42 108 40 40 40
+108 40 40 40 109 38 38 38
+109 38 38 38 110 36 36 36
+110 36 36 36 111 34 34 34
+111 34 34 34 112 32 32 32
+112 32 32 32 113 30 30 30
+113 30 30 30 114 28 28 28
+114 28 28 28 115 26 26 26
+115 26 26 26 116 24 24 24
+116 24 24 24 117 22 22 22
+117 22 22 22 118 20 20 20
+118 20 20 20 119 18 18 18
+119 18 18 18 120 16 16 16
+120 16 16 16 121 14 14 14
+121 14 14 14 122 12 12 12
+122 12 12 12 123 10 10 10
+123 10 10 10 124 8 8 8
+124 8 8 8 125 6 6 6
+125 6 6 6 126 4 4 4
+126 4 4 4 127 2 2 2
+127 2 2 2 128 0 0 0
+128 0 0 0 129 2 2 2
+129 2 2 2 130 4 4 4
+130 4 4 4 131 6 6 6
+131 6 6 6 132 8 8 8
+132 8 8 8 133 10 10 10
+133 10 10 10 134 12 12 12
+134 12 12 12 135 14 14 14
+135 14 14 14 136 16 16 16
+136 16 16 16 137 18 18 18
+137 18 18 18 138 20 20 20
+138 20 20 20 139 22 22 22
+139 22 22 22 140 24 24 24
+140 24 24 24 141 26 26 26
+141 26 26 26 142 28 28 28
+142 28 28 28 143 30 30 30
+143 30 30 30 144 32 32 32
+144 32 32 32 145 34 34 34
+145 34 34 34 146 36 36 36
+146 36 36 36 147 38 38 38
+147 38 38 38 148 40 40 40
+148 40 40 40 149 42 42 42
+149 42 42 42 150 44 44 44
+150 44 44 44 151 46 46 46
+151 46 46 46 152 48 48 48
+152 48 48 48 153 50 50 50
+153 50 50 50 154 52 52 52
+154 52 52 52 155 54 54 54
+155 54 54 54 156 56 56 56
+156 56 56 56 157 58 58 58
+157 58 58 58 158 60 60 60
+158 60 60 60 159 62 62 62
+159 62 62 62 160 64 64 64
+160 64 64 64 161 66 66 66
+161 66 66 66 162 68 68 68
+162 68 68 68 163 70 70 70
+163 70 70 70 164 72 72 72
+164 72 72 72 165 74 74 74
+165 74 74 74 166 76 76 76
+166 76 76 76 167 78 78 78
+167 78 78 78 168 80 80 80
+168 80 80 80 169 82 82 82
+169 82 82 82 170 84 84 84
+170 84 84 84 171 86 86 86
+171 86 86 86 172 88 88 88
+172 88 88 88 173 90 90 90
+173 90 90 90 174 92 92 92
+174 92 92 92 175 94 94 94
+175 94 94 94 176 96 96 96
+176 96 96 96 177 98 98 98
+177 98 98 98 178 100 100 100
+178 100 100 100 179 102 102 102
+179 102 102 102 180 104 104 104
+180 104 104 104 181 106 106 106
+181 106 106 106 182 108 108 108
+182 108 108 108 183 110 110 110
+183 110 110 110 184 112 112 112
+184 112 112 112 185 114 114 114
+185 114 114 114 186 116 116 116
+186 116 116 116 187 118 118 118
+187 118 118 118 188 120 120 120
+188 120 120 120 189 122 122 122
+189 122 122 122 190 124 124 124
+190 124 124 124 191 126 126 126
+191 126 126 126 192 129 129 129
+192 129 129 129 193 131 131 131
+193 131 131 131 194 133 133 133
+194 133 133 133 195 135 135 135
+195 135 135 135 196 137 137 137
+196 137 137 137 197 139 139 139
+197 139 139 139 198 141 141 141
+198 141 141 141 199 143 143 143
+199 143 143 143 200 145 145 145
+200 145 145 145 201 147 147 147
+201 147 147 147 202 149 149 149
+202 149 149 149 203 151 151 151
+203 151 151 151 204 153 153 153
+204 153 153 153 205 155 155 155
+205 155 155 155 206 157 157 157
+206 157 157 157 207 159 159 159
+207 159 159 159 208 161 161 161
+208 161 161 161 209 163 163 163
+209 163 163 163 210 165 165 165
+210 165 165 165 211 167 167 167
+211 167 167 167 212 169 169 169
+212 169 169 169 213 171 171 171
+213 171 171 171 214 173 173 173
+214 173 173 173 215 175 175 175
+215 175 175 175 216 177 177 177
+216 177 177 177 217 179 179 179
+217 179 179 179 218 181 181 181
+218 181 181 181 219 183 183 183
+219 183 183 183 220 185 185 185
+220 185 185 185 221 187 187 187
+221 187 187 187 222 189 189 189
+222 189 189 189 223 191 191 191
+223 191 191 191 224 193 193 193
+224 193 193 193 225 195 195 195
+225 195 195 195 226 197 197 197
+226 197 197 197 227 199 199 199
+227 199 199 199 228 201 201 201
+228 201 201 201 229 203 203 203
+229 203 203 203 230 205 205 205
+230 205 205 205 231 207 207 207
+231 207 207 207 232 209 209 209
+232 209 209 209 233 211 211 211
+233 211 211 211 234 213 213 213
+234 213 213 213 235 215 215 215
+235 215 215 215 236 217 217 217
+236 217 217 217 237 219 219 219
+237 219 219 219 238 221 221 221
+238 221 221 221 239 223 223 223
+239 223 223 223 240 225 225 225
+240 225 225 225 241 227 227 227
+241 227 227 227 242 229 229 229
+242 229 229 229 243 231 231 231
+243 231 231 231 244 233 233 233
+244 233 233 233 245 235 235 235
+245 235 235 235 246 237 237 237
+246 237 237 237 247 239 239 239
+247 239 239 239 248 241 241 241
+248 241 241 241 249 243 243 243
+249 243 243 243 250 245 245 245
+250 245 245 245 251 247 247 247
+251 247 247 247 252 249 249 249
+252 249 249 249 253 251 251 251
+253 251 251 251 254 253 253 253
+254 253 253 253 255 255 255 255
+B 0 0 0
+F 0 0 0
+N 0 0 0
Copied: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/plot_VTK.py (from rev 20300, seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_VTK.py)
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/plot_VTK.py (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/plot_VTK.py 2012-06-04 18:13:02 UTC (rev 20302)
@@ -0,0 +1,116 @@
+#!/usr/bin/env python
+#
+# creates a PNG file from a polygon data file *.vtk
+#
+from vtk import *
+import sys
+
+# input:
+if len(sys.argv) == 2:
+ modelfile = str(sys.argv[1])
+else :
+ print "Usage: python plot_VTK.py OUTPUT_FILES/bin_movie_009000.d.vtk"
+ sys.exit(1)
+
+print "modelfile: ",modelfile
+
+
+# creates 2D projection view
+# graticule
+latLevel = 3
+lngLevel = 3
+pname = "eqc" # equidistant cylindrical (plate caree)
+pcs = vtkGeoProjection()
+pcs.SetName( pname )
+pcs.SetCentralMeridian( 0. )
+gcs = vtkGeoProjection()
+xfm = vtkGeoTransform()
+xfm.SetSourceProjection( gcs )
+xfm.SetDestinationProjection( pcs )
+
+# reads in polygon data
+model = vtkPolyDataReader()
+model.SetFileName(modelfile)
+model.Update()
+
+# Delaunay triangulation on data
+delaunay2D = vtkDelaunay2D()
+delaunay2D.SetInput( model.GetOutput() )
+delaunay2D.Update()
+print "delaunay : "
+print " points: ",delaunay2D.GetOutput().GetNumberOfPoints()
+print " polygons: ",delaunay2D.GetOutput().GetNumberOfPolys()
+
+xf3 = vtkTransformFilter()
+xf3.SetTransform( xfm )
+xf3.SetInputConnection( delaunay2D.GetOutputPort() )
+
+
+# coloring
+#output from: ./convert_cpt_lookuptable_python.bash blue_white_red.cpt
+colortable = vtkLookupTable()
+colortable.SetNumberOfTableValues(25)
+colortable.SetTableValue( 0 , 1 , 0.0392157 , 0.0392157 , 1.0 )
+colortable.SetTableValue( 1 , 1 , 0.121569 , 0.121569 , 0.878431 )
+colortable.SetTableValue( 2 , 1 , 0.2 , 0.2 , 0.8 )
+colortable.SetTableValue( 3 , 1 , 0.278431 , 0.278431 , 0.721569 )
+colortable.SetTableValue( 4 , 1 , 0.360784 , 0.360784 , 0.639216 )
+colortable.SetTableValue( 5 , 1 , 0.439216 , 0.439216 , 0.560784 )
+colortable.SetTableValue( 6 , 1 , 0.521569 , 0.521569 , 0.47451 )
+colortable.SetTableValue( 7 , 1 , 0.6 , 0.6 , 0.396078 )
+colortable.SetTableValue( 8 , 1 , 0.678431 , 0.678431 , 0.317647 )
+colortable.SetTableValue( 9 , 1 , 0.760784 , 0.760784 , 0.235294 )
+colortable.SetTableValue( 10 , 1 , 0.839216 , 0.839216 , 0.156863 )
+colortable.SetTableValue( 11 , 1 , 0.921569 , 0.921569 , 0.0745098 )
+colortable.SetTableValue( 12 , 0.996078 , 0.996078 , 0.996078 , 0.0 )
+colortable.SetTableValue( 13 , 0.921569 , 0.921569 , 1 , 0.0823529 )
+colortable.SetTableValue( 14 , 0.839216 , 0.839216 , 1 , 0.164706 )
+colortable.SetTableValue( 15 , 0.760784 , 0.760784 , 1 , 0.243137 )
+colortable.SetTableValue( 16 , 0.678431 , 0.678431 , 1 , 0.32549 )
+colortable.SetTableValue( 17 , 0.6 , 0.6 , 1 , 0.403922 )
+colortable.SetTableValue( 18 , 0.521569 , 0.521569 , 1 , 0.482353 )
+colortable.SetTableValue( 19 , 0.439216 , 0.439216 , 1 , 0.560784 )
+colortable.SetTableValue( 20 , 0.360784 , 0.360784 , 1 , 0.639216 )
+colortable.SetTableValue( 21 , 0.278431 , 0.278431 , 1 , 0.721569 )
+colortable.SetTableValue( 22 , 0.2 , 0.2 , 1 , 0.8 )
+colortable.SetTableValue( 23 , 0.121569 , 0.121569 , 1 , 0.878431 )
+colortable.SetTableValue( 24 , 0.0392157 , 0.0392157 , 1 , 1.0 )
+colortable.SetTableRange(0.0,255.0)
+
+# creates new actor based on PolyData mapper
+mapper3 = vtkPolyDataMapper()
+mapper3.SetInputConnection( xf3.GetOutputPort() )
+mapper3.SetScalarRange(0.0,255.0)
+mapper3.ColorArrayName= "displacement"
+mapper3.ColorAttributeType= 0
+mapper3.SetLookupTable( colortable )
+
+actor3 = vtkActor()
+actor3.SetMapper( mapper3 )
+
+
+# view rendering
+ren = vtkRenderer()
+ren.AddActor( actor3 )
+ren.SetBackground(0,0,0) # black
+
+window = vtkRenderWindow()
+window.SetMultiSamples(0)
+window.AddRenderer( ren )
+window.SetSize(1000, 500)
+window.OffScreenRenderingOn()
+
+ren.ResetCamera()
+ren.GetActiveCamera().Zoom(2.2)
+window.Render()
+
+# writes png images
+windowToImage = vtkWindowToImageFilter()
+windowToImage.SetInput(window)
+PNGWriter = vtkPNGWriter()
+PNGWriter.SetInputConnection( windowToImage.GetOutputPort() )
+PNGWriter.SetFileName("bin_color.png")
+PNGWriter.Write()
+
+#window.GetInteractor().Initialize()
+#window.GetInteractor().Start()
Copied: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/plot_VTK_gray.py (from rev 20300, seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_VTK_gray.py)
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/plot_VTK_gray.py (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/plot_VTK_gray.py 2012-06-04 18:13:02 UTC (rev 20302)
@@ -0,0 +1,117 @@
+#!/usr/bin/env python
+#
+# creates a (gray-scale) PNG file from a polygon data file *.vtk
+#
+from vtk import *
+import sys
+
+# input:
+if len(sys.argv) == 2:
+ modelfile = str(sys.argv[1])
+else :
+ print "Usage: python plot_VTK_gray.py OUTPUT_FILES/bin_movie_009000.d.vtk"
+ sys.exit(1)
+
+print "modelfile: ",modelfile
+
+
+# creates 2D projection view
+# graticule
+latLevel = 3
+lngLevel = 3
+pname = "eqc" # equidistant cylindrical (plate caree)
+pcs = vtkGeoProjection()
+pcs.SetName( pname )
+pcs.SetCentralMeridian( 0. )
+gcs = vtkGeoProjection()
+xfm = vtkGeoTransform()
+xfm.SetSourceProjection( gcs )
+xfm.SetDestinationProjection( pcs )
+
+# reads in polygon data
+model = vtkPolyDataReader()
+model.SetFileName(modelfile)
+model.Update()
+
+# Delaunay triangulation on data
+delaunay2D = vtkDelaunay2D()
+delaunay2D.SetInput( model.GetOutput() )
+delaunay2D.Update()
+print "delaunay : "
+print " points: ",delaunay2D.GetOutput().GetNumberOfPoints()
+print " polygons: ",delaunay2D.GetOutput().GetNumberOfPolys()
+
+xf3 = vtkTransformFilter()
+xf3.SetTransform( xfm )
+xf3.SetInputConnection( delaunay2D.GetOutputPort() )
+
+
+# coloring
+#output from: ./convert_cpt_lookuptable_python.bash gray_pyramid_inv.cpt
+colortable = vtkLookupTable()
+colortable.SetNumberOfTableValues(25)
+colortable.SetTableValue( 0 , 1.0 , 1.0 , 1.0 , 1 )
+colortable.SetTableValue( 1 , 0.878431 , 0.878431 , 0.878431 , 1 )
+colortable.SetTableValue( 2 , 0.8 , 0.8 , 0.8 , 1 )
+colortable.SetTableValue( 3 , 0.721569 , 0.721569 , 0.721569 , 1 )
+colortable.SetTableValue( 4 , 0.639216 , 0.639216 , 0.639216 , 1 )
+colortable.SetTableValue( 5 , 0.560784 , 0.560784 , 0.560784 , 1 )
+colortable.SetTableValue( 6 , 0.47451 , 0.47451 , 0.47451 , 1 )
+colortable.SetTableValue( 7 , 0.396078 , 0.396078 , 0.396078 , 1 )
+colortable.SetTableValue( 8 , 0.317647 , 0.317647 , 0.317647 , 1 )
+colortable.SetTableValue( 9 , 0.235294 , 0.235294 , 0.235294 , 1 )
+colortable.SetTableValue( 10 , 0.156863 , 0.156863 , 0.156863 , 1 )
+colortable.SetTableValue( 11 , 0.0745098 , 0.0745098 , 0.0745098 , 1 )
+colortable.SetTableValue( 12 , 0.00392157 , 0.00392157 , 0.00392157 , 1 )
+colortable.SetTableValue( 13 , 0.0823529 , 0.0823529 , 0.0823529 , 1 )
+colortable.SetTableValue( 14 , 0.164706 , 0.164706 , 0.164706 , 1 )
+colortable.SetTableValue( 15 , 0.243137 , 0.243137 , 0.243137 , 1 )
+colortable.SetTableValue( 16 , 0.32549 , 0.32549 , 0.32549 , 1 )
+colortable.SetTableValue( 17 , 0.403922 , 0.403922 , 0.403922 , 1 )
+colortable.SetTableValue( 18 , 0.482353 , 0.482353 , 0.482353 , 1 )
+colortable.SetTableValue( 19 , 0.560784 , 0.560784 , 0.560784 , 1 )
+colortable.SetTableValue( 20 , 0.639216 , 0.639216 , 0.639216 , 1 )
+colortable.SetTableValue( 21 , 0.721569 , 0.721569 , 0.721569 , 1 )
+colortable.SetTableValue( 22 , 0.8 , 0.8 , 0.8 , 1 )
+colortable.SetTableValue( 23 , 0.878431 , 0.878431 , 0.878431 , 1 )
+colortable.SetTableValue( 24 , 1.0 , 1.0 , 1.0 , 1 )
+colortable.SetTableRange(0.0,255.0)
+
+
+# creates new actor based on PolyData mapper
+mapper3 = vtkPolyDataMapper()
+mapper3.SetInputConnection( xf3.GetOutputPort() )
+mapper3.SetScalarRange(0.0,255.0)
+mapper3.ColorArrayName= "displacement"
+mapper3.ColorAttributeType= 0
+mapper3.SetLookupTable( colortable )
+
+actor3 = vtkActor()
+actor3.SetMapper( mapper3 )
+
+
+# view rendering
+ren = vtkRenderer()
+ren.AddActor( actor3 )
+ren.SetBackground(0,0,0) # black
+
+window = vtkRenderWindow()
+window.SetMultiSamples(0)
+window.AddRenderer( ren )
+window.SetSize(1000, 500)
+window.OffScreenRenderingOn()
+
+ren.ResetCamera()
+ren.GetActiveCamera().Zoom(2.2)
+window.Render()
+
+# writes png images
+windowToImage = vtkWindowToImageFilter()
+windowToImage.SetInput(window)
+PNGWriter = vtkPNGWriter()
+PNGWriter.SetInputConnection( windowToImage.GetOutputPort() )
+PNGWriter.SetFileName("bin_mask.png")
+PNGWriter.Write()
+
+#window.GetInteractor().Initialize()
+#window.GetInteractor().Start()
Copied: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/plot_movie_GMT_binary_VTK.pl (from rev 20300, seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/plot_movie_GMT_binary_VTK.pl)
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/plot_movie_GMT_binary_VTK.pl (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/plot_movie_GMT_binary_VTK.pl 2012-06-04 18:13:02 UTC (rev 20302)
@@ -0,0 +1,281 @@
+#!/usr/bin/perl -W
+#
+# reads in binary files produced from xcreate_movie_GMT_global
+# and creates png files with transparency
+#
+# uses segmented M-file to plot with psxy
+#
+
+use Getopt::Std;
+use POSIX;
+
+sub Usage {
+ print STDERR <<EOF;
+
+Usage: plot_movie_GMT_binary_VTK.pl file_name
+
+ ex. ./plot_movie_GMT_binary_VTK.pl OUTPUT_FILES/bin_movie_00***.d
+
+EOF
+exit(1)
+}
+
+if (!getopts('l:L:cdts')) {die('Check input arguments\n');}
+ at ARGV > 0 or Usage();
+
+
+#######################################################
+## PARAMETERS
+
+# specfem3D Par_file settings
+$nex = 160;
+$nproc = 5;
+$nchunks = 6;
+
+# gunzipped files (ending .gz)
+$gzipped = 0;
+
+# point locations
+$xy_file = "OUTPUT_FILES/bin_movie.xy";
+
+# non-linear scaling
+$power_scaling = 0.5;
+
+
+#######################################################
+
+
+# gunzips location file
+if( $gzipped == 1 ){
+ system("cp -v $xy_file.gz $xy_file.gz.org");
+ system("gunzip -f $xy_file.gz");
+}
+
+print "Processing locations: $xy_file\n";
+
+(@lines) = read_binary_file_locations($xy_file);
+$nlines = @lines;
+print " number of lines: $nlines\n\n";
+
+# restore gzipped file
+if( $gzipped == 1 ) {system("mv $xy_file.gz.org $xy_file.gz");}
+
+open(CSH,">plot_movie.csh");
+
+
+foreach $file (@ARGV) {
+
+ if (not -f $file) {die("No $file\n");}
+
+ print "Processing frame $file...\n";
+
+ # gunzips data file
+ if( $gzipped == 1 ){
+ $filegz = $file;
+ $file = substr($file,0,length($filegz)-3);
+ system("cp $filegz $filegz.org");
+ system("gunzip -f $filegz");
+ }
+ print " $file\n";
+
+ # reads displacement file (binary data)
+ (@lines_f) = read_binary_file_data($file);
+ $nlines_f = @lines_f;
+
+ # restore gzipped file
+ if( $gzipped == 1 ) {system("mv $filegz.org $filegz");}
+
+ if ($nlines_f != $nlines) {die("number of lines differ\n");}
+
+
+ # non-linear scaling of displacement data and min/max
+ $min = 1.e30;
+ $max = -1.e30;
+ for($i=0;$i<$nlines;$i++){
+ # scale between 0,1
+ $val = $lines_f[$i];
+ if( $power_scaling > 0 ) {
+ if( $val > 0 ){
+ $val = $val**$power_scaling;
+ }else{
+ $val = - abs($val)**$power_scaling;
+ }
+ }
+ # determines min/max of displacements
+ if( $val < $min) {$min = $val;}
+ if( $val > $max) {$max = $val;}
+ $lines_f[$i] = $val;
+ }
+ if( abs($min) > abs($max) ){$max = abs($min);}
+
+ # writes out segment file
+ open VTKFILE, ">$file.vtk" or die $!;
+ print VTKFILE "# vtk DataFile Version 3.1\n";
+ print VTKFILE "specfem3D_data\n";
+ print VTKFILE "ASCII\n";
+ print VTKFILE "DATASET POLYDATA\n";
+ print VTKFILE "POINTS $nlines float\n";
+
+ @elem_val = ();
+ for($i=0;$i<$nlines;$i++){
+ # scale between 0,1
+ $val = ($lines_f[$i] + $max)/(2.0*$max);
+ # scale between 0, 255
+ $val = $val * 255.0;
+
+ # prints value together with coordinates
+ $coord = $lines[$i];
+ chomp($coord);
+
+ # adds point: uses lon, lat and 0 (flat earth file)
+ print VTKFILE "$coord 0.0 \n";
+
+ # stores values in arrays
+ push(@elem_val, $val );
+ }
+ print VTKFILE "\n";
+
+
+ # specfem3D output for MOVIE_COARSE
+ $nex_per_proc = $nex / $nproc ;
+ $total = $nproc * $nex_per_proc * $nproc * $nex_per_proc * $nchunks;
+ if( $total != $nlines ){ die("error nex/proc $nlines $total");}
+
+ $npoly = $nproc * $nproc* $nchunks * ($nex_per_proc-1) * ($nex_per_proc-1);
+ print VTKFILE "POLYGONS $npoly ",$npoly*5," \n";
+ $count = 0;
+ for($n=0;$n<$nproc*$nproc*$nchunks;$n++){
+ for($m=0;$m<$nex_per_proc-1;$m++){
+ for ($k=0;$k<$nex_per_proc-1;$k++){
+ # global array index
+ $i = $k + $m*$nex_per_proc + $n*$nex_per_proc*$nex_per_proc;
+
+ # adds element
+ print VTKFILE "4 ",$i," ",$i+1," ",$i+$nex_per_proc+1," ",$i+$nex_per_proc," \n";
+ $count++;
+ }
+ }
+ }
+ print VTKFILE "\n";
+
+ print "count: $count \n";
+
+ print VTKFILE "POINT_DATA $nlines \n";
+ print VTKFILE "SCALARS displacement float\n";
+ print VTKFILE "LOOKUP_TABLE default\n";
+ for($i=0;$i<$nlines;$i++){
+ $val = $elem_val[$i];
+ print VTKFILE "$val \n";
+ }
+ print VTKFILE "\n";
+ close(VTKFILE);
+
+ # creates png files
+ #print CSH "python plot_VTKdisp.py $file.vtk \n";
+ #print CSH "python plot_VTKdisp_gray.py $file.vtk \n";
+ #print CSH "mv bin_disp.png $file.disp.png \n";
+ #print CSH "mv bin_mask.png $file.mask.png \n";
+
+ # creates file with transparency (opacity)
+ #print CSH "composite -compose CopyOpacity $file.mask.png $file.disp.png $file.png\n";
+
+ print CSH "echo \n";
+ print CSH "echo 'plotted: $file.png' \n";
+ print CSH "echo \n";
+
+}
+close(CSH);
+
+print "\nplotting... \n\n";
+
+system("csh -f plot_movie.csh");
+
+system("rm -f plot_movie.csh");
+
+#-------------------------------------------------------------
+
+sub read_binary_file_locations{
+
+ my($xy_file) = @_;
+ my(@return_lines);
+ my(@lines,$line,$is_ok,$junk,$n1,$n2,$data1,$data2);
+
+ # reads in locations (binary data)
+ open FILE, "$xy_file" or die $!;
+ binmode FILE;
+
+ @lines= () ;
+ $line="";
+ $is_ok = 1;
+ while ( $is_ok != 0) {
+ read FILE, $junk, 4;
+
+ $n1 = read FILE, $data1, 4;
+ if( $n1 != 0 ){
+ ($lon) = unpack( "f",$data1);
+ }
+ $n2 = read FILE, $data2, 4;
+ if( $n2 != 0 ){
+ ($lat) = unpack( "f",$data2);
+ }
+ read FILE, $junk, 4;
+
+ #print "$n1 $n2 bytes read: lon=$lon \t \t lat=$lat\n";
+
+ if( $n1 != 0 && $n2 != 0 ){
+ $line = "$lon $lat \n";
+ push(@lines, $line);
+ $is_ok = 1;
+ }
+ else{ $is_ok = 0;}
+
+ }
+ close(FILE);
+
+ @return_lines = @lines;
+ return @return_lines;
+
+}
+
+
+#-------------------------------------------------------------
+
+sub read_binary_file_data{
+
+ my($file) = @_;
+ my(@return_lines_f);
+ my(@lines_f,$is_ok,$junk,$n1,$data1);
+
+ open FILE, "$file" or die $!;
+ binmode FILE;
+
+ @lines_f = () ;
+ $line = "";
+ $is_ok = 1;
+ while ( $is_ok != 0) {
+ read FILE, $junk, 4;
+
+ $n1 = read FILE, $data1, 4;
+ if( $n1 != 0 ){
+ ($val) = unpack( "f",$data1);
+ }
+
+ read FILE, $junk, 4;
+
+ #print "$n1 bytes read: value=$val \n";
+
+ if( $n1 != 0 ){
+ $line = "$val \n";
+ push(@lines_f, $line);
+ $is_ok = 1;
+ }
+ else{ $is_ok = 0;}
+ }
+ close(FILE);
+
+ @return_lines_f = @lines_f;
+ return @return_lines_f;
+
+}
+
+#-------------------------------------------------------------
Copied: seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/readme_VTK.txt (from rev 20300, seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK/readme.txt)
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/readme_VTK.txt (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/utils/Visualization/VTK_ParaView/readme_VTK.txt 2012-06-04 18:13:02 UTC (rev 20302)
@@ -0,0 +1,115 @@
+--------------------------------
+readme
+--------------------------------
+
+VTK, The Visualization Toolkit
+http://www.vtk.org/
+
+
+
+- procedure to make a PNG image (flat earth):
+
+------------------
+NOTE: this requires VTK to be installed and compiled with python wrappers
+ see small howto note below.
+------------------
+
+
+1. run specfem with the movie options (see Par_file):
+
+ MOVIE_SURFACE = .true.
+ MOVIE_COARSE = .false.
+
+ and adjust the time steps NSTEP_BETWEEN_FRAMES
+
+ this creates binary files in directory OUTPUT_FILES/ like: moviedata000100,...
+
+
+2. convert binary files to GMT-files:
+
+ in SPECFEM3D_GLOBE: > make xcreate_movie_GMT_global
+
+ run it > ./xcreate_movie_GMT_global
+
+ choose option for binary (T)
+ to create individual files
+
+
+3. create VTK files:
+
+ > ./plot_movie_GMT_binary_VTK.pl OUTPUT_FILES/bin_movie_00***.d
+
+
+4. render VTK files to create a PNG image:
+
+ for each single file:
+
+ > python plot_VTK.py OUTPUT_FILES/bin_movie_009000.d.vtk
+
+ this creates a single PNG image 'bin_color.png'
+
+
+optional, to add transparency:
+
+ a) create a color image:
+
+ > python plot_VTK.py OUTPUT_FILES/bin_movie_009000.d.vtk
+
+ and a gray-scale image:
+
+ > python plot_VTK_gray.py OUTPUT_FILES/bin_movie_009000.d.vtk
+
+
+ b) use the gray-scale image as alpha channel in the new file to
+ create a file with transparency (opacity):
+
+ > composite -compose CopyOpacity bin_mask.png bin_color.png bin_image.png
+
+ this requires software installed from ImageMagick
+ ( http://www.imagemagick.org/ )
+
+
+
+------------------
+VTK installation - python wrapper:
+------------------
+
+ download sources from:
+ http://www.vtk.org/VTK/resources/software.html
+
+ install with python wrappers and Geovis for example in /opt/vtk-5.4.2:
+ > cd /opt/vtk-5.4.2
+ > tar -xvf vtk-5.4.2.tar
+ > cd VTK
+ > ccmake .
+
+ turn on options: BUILD_SHARED_LIBS ON
+ CMAKE_INSTALL_PREFIX /opt/vtk-5.4.2
+ VTK_USE_GEOVIS ON
+ VTK_WRAP_PYTHON ON
+ > make
+ > make install
+
+ export your python path specifics for example in ~/.bashrc:
+
+ # vtk python
+ export PYTHONPATH=$PYTHONPATH:/opt/vtk-5.4.2/VTK/bin
+ export PYTHONPATH=$PYTHONPATH:/opt/vtk-5.4.2/VTK/Wrapping/Python/
+ export PATH=$PATH:/opt/vtk-5.4.2/VTK/bin
+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/vtk-5.4.2/VTK/lib/
+
+ check if properly installed:
+ > cd ~/SPECFEM3D_GLOBE/UTILS/VTK
+ > python
+
+ >>> from vtk import *
+ >>> gs = vtkGeoProjection()
+
+ if any of this fails, check your path default settings:
+
+ >>> import sys
+ >>> sys.path
+
+ and fix the paths in your ~/.bashrc
+
+
\ No newline at end of file
More information about the CIG-COMMITS
mailing list