image processing - How to convert jp2 in pyramidal tiled files? -


i have set of whole slide images ~300-400 mb jp2 files , convert them in pyramidal (multi resolution) structures in such way each pyramid level decomposed in tiles. defition files pyramidal structures idea of how access specific resolution level , respective tiles?

thanks.

if looking quick , easy solution here do:

$ kdu_expand -i input.jp2 -o output_tmp.tiff 

i use kakadu here since there no other implementations know of capable of dealing such large images. in case cannot use free kakadu binaries (academy only) , cannot afford license price, may want try again openjpeg:

$ opj_decode  -i input.jp2 -o output_tmp.tiff 

at least have been warned.

anyway have file handled vips do:

$ vips output_tmp.tiff pyramid_deflate.tiff --tile --pyramid --compression deflate --tile-width 256 --tile-height 256 

this create pyramidal tiff tile size of 256x256 (pick favorite dimensions). choose deflate since did not mentionned whether or not accept lossy compression.

in case not care lossy artefact(s) should instead prefer jpeg compression:

$ vips output_tmp.tiff pyramid_jpeg.tiff --tile --pyramid --compression jpeg --q 80 --tile-width 256 --tile-height 256 

same comment above, pick quality of 80 here can set favorite 1 here.

your original not quite clear:

by defition files pyramidal structures idea of how access specific resolution level , respective tiles?

which seems kind of secondary question. in case can use openslide api access specific tile @ specific level:

in c:

in python:

in java:


while above point point b, enormous amount of work. instead more careful solution employed extract jp2 levels 1 @ time , convert them pyramidal tiff. since not know of such tools, task may require coding in kakadu codebase and/or vips codebase.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -