2

I am using papaya to view DICOM images. http://ric.uthscsa.edu/mango/papaya.html

I wanted to know how can I move to the next slice using the keyboard keys. Since all the command is embedded on the javascript file, is there a specific function I should be looking for ?

Please help.

martinez314
  • 12,162
  • 5
  • 36
  • 63
chrisrhyno2003
  • 3,906
  • 8
  • 53
  • 102

1 Answers1

0

See the incrementAxial(), incrementCoronal(), and incrementSagittal() functions in viewer.js:

papaya.viewer.Viewer.prototype.incrementAxial
papaya.viewer.Viewer.prototype.incrementCoronal
papaya.viewer.Viewer.prototype.incrementSagittal

They take one argument, a boolean to indicate whether to increment (true) or decrement (false).

In order to know which one to increment, you need to know which slice direction is the main slice. See below for an example of how that it is handled:

if (this.mainImage.sliceDirection === papaya.viewer.ScreenSlice.DIRECTION_AXIAL) {
    this.incrementAxial(false);
} else if (this.mainImage.sliceDirection === papaya.viewer.ScreenSlice.DIRECTION_CORONAL) {
    this.incrementCoronal(false);
} else if (this.mainImage.sliceDirection === papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL) {
    this.incrementSagittal(true);
}
martinez314
  • 12,162
  • 5
  • 36
  • 63