Changeset 1128 in Sophya
- Timestamp:
- Aug 8, 2000, 5:33:19 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/Tests/midasitt.cc
r1123 r1128 68 68 m[1]->AppendItem("Surf-3D-Color", 10205); 69 69 m[1]->AppendItem("Image", 10206); 70 m[1]->AppendItem("Image Gauss", 10207); 70 71 71 72 AppendMenu(m[1]); … … 257 258 awp->Show(); 258 259 260 SetReady(); 261 } 262 break; 263 264 case 10207 : 265 { 266 SetBusy(); // souris -> montre 267 txt->SetText("PIImage Creation\n Image Display \n Button 1 -> Coord/value \n Button 2 Select Rectangle \n Butt on 3 Move \n <Alt>O <Alt>V <Alt>C \n Try ImageTools"); 268 269 int sx=400, sy=600; 270 printf(" Creating Image (%dx%d) ... ", sx, sy); 271 float* img = new float[sx*sy]; 272 int i, j; 273 for(i=0;i<sx;i++) { 274 double x = (i-sx/2.)/(sx/5.); 275 for(j=0;j<sy;j++) { 276 double y = (j-sy/2.)/(sy/5.); 277 y = -0.5*(x*x+y*y); 278 if(y<-80.) y=0.; 279 img[j*sx+i] = 1000.*exp(-0.5*(x*x+y*y)); 280 } 281 } 282 printf(" >> OK \n"); 283 nbwin++; sprintf(strg,"Image (PI W %d)", nbwin); 284 PIWindow* awp = new PIWindow(this, strg, PIWK_normal, sx, sy, 300, 300); 285 PIImage * pii = new PIImage(awp, "fitsimage", sx, sy, 0, 0); 286 pii->SetBinding(PIBK_fixed, PIBK_fixed, PIBK_fixed, PIBK_fixed); 287 pii->SetZoomWin(zoom, false); 288 pii->SetCMapWin(cmapv, false); 289 pii->ShowCursor(true); 290 pii->SetColMap(&midas_cmap, false); 291 awp->SetAutoDelChilds(true); 292 awp->Show(); 293 pii->SetImage(new P2DAdapter<float>(img, sx, sy, true), true); 259 294 SetReady(); 260 295 }
Note:
See TracChangeset
for help on using the changeset viewer.