Giter VIP home page Giter VIP logo

Comments (10)

jcupitt avatar jcupitt commented on July 1, 2024

You could allocate a 512x512 (or whatever) preview image in memory, then on each load, paste a shrunk version of that image into your memory image and update the display from that.

libvips supports progress bars, so you could also display an animated "x% complete" message during dzsave.

from pyvips.

shivamchaubey avatar shivamchaubey commented on July 1, 2024

Hello @jcupitt ,
Thanks for your immediate response .
I am trying to visualize the image in full resolution so that it can be zoomed and analyzed while mosaicing is in progress. Kind of pyramidal structure is required, I think. This is the link https://youtu.be/fOiUkui5TL8 of WSI system, please go through the video to understand my objective.

from pyvips.

jcupitt avatar jcupitt commented on July 1, 2024

I'm not sure that will work with libvips. It does not mosaic the image in stages in a way you could visualise -- it mosaics in small pieces on demand as the output is generated.

In the same way, dzsave does not generate the layers one after the other. Instead, it writes all the layers simultaneously in a single top-bottom pass.

from pyvips.

shivamchaubey avatar shivamchaubey commented on July 1, 2024

Yes, that's what I have understood. So, is there any way to do it? Any suggestion?

from pyvips.

jcupitt avatar jcupitt commented on July 1, 2024

I would just display the mosaic I think. For example:

https://github.com/jcupitt/vipsdisp

will display the output of a vips pipeline and let you zoom and pan around.

from pyvips.

shivamchaubey avatar shivamchaubey commented on July 1, 2024

hello @jcupitt,
I am replying a bit late. Vipsdisp can be used only when the whole image is created and saved right? Can we use this while a pipeline is created?
Also can you please suggest how progress bars can be displayed while saving the result?
result.write_to_file('test.tiff',Q=95, compression="lzw", bigtiff=True)

from pyvips.

jcupitt avatar jcupitt commented on July 1, 2024

Hello again, vipsdisp can display pipeline output directly. There's no need to save.

To get progress feedback, you need to listen for eval signals on the output image. That would be a bit tricky from Python, you'd need to extend pyvips a bit.

You can just set the VIPS_PROGRESS environment variable for simple text feedback.

from pyvips.

shivamchaubey avatar shivamchaubey commented on July 1, 2024

Ok, but it will show in the last after the pipeline is linked to a sink right? Can't we see in the mapping phase? Is there any example of vips_progress for python script?

from pyvips.

jcupitt avatar jcupitt commented on July 1, 2024

vipsdisp is a sink. You connect the output of the pipeline to the display, and then pixels are calculated as you zoom and scroll around.

Just set the environment variable VIPS_PROGRESS:

https://stackoverflow.com/questions/5971312/how-to-set-environment-variables-in-python

from pyvips.

shivamchaubey avatar shivamchaubey commented on July 1, 2024

Thanks @jcupitt

from pyvips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.