Extracting Whole Slide Image by Using OpenslideAPI

TAE WOOK OH taewooko at gmail.com
Tue Nov 22 15:06:31 EST 2011


Hi openslide folks,

I have a question for extracting Whole Slide Image by Using OpenslideAPI.

I called below function to extract image from whole slide image.  (.svs)

openslide_read_region(osr, buf, startCoordinateX, endCoordinateY, 0,
tile_w, tile_h);

For testing,

I execute command like as follows.

command: (region5 is the command that I modified ... it's exactly same as
openslideTiler with different argument order.

Usage:
region inputFileName startCoordinateX startCoordinateY endCoordinateX
endCoordinateY

Actual command:
region5 TCGA-08-0352-01Z-00-DX2.svs 0 12425 500 12925

Input image : TCGA-08-0352-01Z-00-DX2.svs

As a result,
ppm file was generated
(TCGA-08-0352-01Z-00-DX2.svs-0000000500-0000000500.ppm)

When I checked the starting coordinate (0, 12425) in the whole slide image
by using aperio,
the coordinate seems different like (0, 13017) ...

I think that there is coordinate difference bug.

For example, based on theory, If i want to extract point (X, Y) from the
whole slide image,
I need to extract the coordinate (X - (width/2), Y-(height/2)).

Starting point( 2000, 2000), extracting image width (500), extracting image
height (500)

then, the starting point X, Y should be 2000 - (500 / 2) = 1750

X, Y( 1750, 1750)

However, according to the testing, I need to set up extracting starting
coordinate (X- (width/2)), Y- (height/2) - height).

I seem like I need to decrease coordinate height again.

X = 2000 - (500/2) = 1750
Y = 2000 - (500/2) - 500 = 1250

X, Y (1750, 1250)

Is this openslideAPI bug ? I am thinking that I can manually change the
coordinate in the worst case..

But, if somebody know the solution, it would be great help for me.

Thanks in advance.

Best,
Steve


-- 
***************************************************
Tae Wook (Steve) Oh

Intern for advanced biomedical database
Research & development
Center for Comprehensive Informatics
Emory University

Email: TOH3 at emory.edu, taewooko at gmail.com
Web: student.gsu.edu/~toh2 <http://student.gsu.edu/%7Etoh2>
***************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20111122/2e44727f/attachment.html 


More information about the openslide-users mailing list