Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Image Viewer  (Read 1237 times)

0 Members and 1 Guest are viewing this topic.

binary1

  • Supporter
  • Occasional poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 51
    • View Profile
Image Viewer
« on: August 24, 2014, 03:30:18 PM »

I'm wondering if anybody has some ideas to help me out.  I'm working on a game for veterinary students.  The student plays the role of a veterinarian in the virtual hospital.  After taking x-rays or ultrasound images, I want the player to be able to view the images.  Ideally, these would be dicom images but they could also be some other format (jpegs, tiffs etc).  The player should be able to move easily to another image, zoom the image, and alter the contrast and grey scale.  And, they shouldn't be able to see the images until they take them! 

I thought of using a scene or window to hold the images.  It would be easy to code things so they couldn't display the images right away.  But, I'm not sure how to let them zoom or alter the grey scale with either of these solutions.  Has anyone done something similar?

I have tried going to an external application like ezdicom or DicomImageViewer but I'm not sure how to restrict what images they can see.  I'm going to try putting the viewer inside the data directory with the images and the see what happens when I package it.  Any other thoughts?

Thanks.
Logged

binary1

  • Supporter
  • Occasional poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 51
    • View Profile
Re: Image Viewer
« Reply #1 on: August 24, 2014, 03:53:36 PM »

One last question.  If you have the user go to an external application, is there any way to return to WME except by alt-tab or otherwise switching the window?  Quitting the external application still leaves you outside the still running WME application.  I was thinking of putting a note in to tell them how to return to the WME application before they click to view images. 
Logged

keybone

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 112
    • View Profile
    • Lucine
Re: Image Viewer
« Reply #2 on: September 19, 2014, 01:44:44 PM »

for move image you can use

Code: WME Script
  1. var youImage = Scene.GetNode("ambient_yourImage");
  2. yourImage.Movable=true;
  3. on "RightClick"
  4. {
  5.  
  6. YourImage.SkipTo(x,y);
  7. }
  8.  
For transparent/ geyscale you cane try with

Code: WME Script
  1. on "RightClick"
  2. {
  3. yourImage.AlphaColor = MakeRGBA(255,255,255,100);
  4. }

or you can shift two image
Code: WME Script
  1. var youImage = Scene.GetNode("ambient_yourImage");
  2. var youImageGrey = Scene.GetNode("ambient_yourImageGrey");
  3. youImageGrey.Visibile=false;
  4.  
  5. on "RightClick"
  6. {
  7. yourImage.Visible=false;
  8. youImageGrey.Visible=true;
  9. }
  10.  
you can use a fadein or fadeout for image

           
Code: WME Script
  1.      var alfa;
  2.                 for (alfa=254; alfa>1; alfa=alfa-20)
  3.                 {
  4.                 yourImage.AlphaColor = MakeRGBA(255,255,255,alfa);
  5.                 Sleep(50);
  6.                 }
  7.                 Sleep(20);
  8.  

i hope of help you :)




Logged
Lucine Company http://www.lucine.it/
Tales of Lucine: The Realm of Hobdark http://www.lucine.it/TalesOfLucine
 

Page created in 0.243 seconds with 17 queries.