Giter VIP home page Giter VIP logo

Comments (6)

twongjirad avatar twongjirad commented on July 29, 2024

Proposed solution is here: 33207d2

This requires a redesign of the data interface layer. Right now we have orig_mat and plot_mat. The latter is thresholded for viewing contrast only. orig_mat on the other hand represents a working copy of the images that can get modified by cv and then passed to the network.

However, orig_mat and plot_mat are only 3 channels. For more channels (like the 12 channel data), we want to be able to swap the channels stored in both orig_mat and plot_mat while retaining the changes in orig_mat.

So here I added (in ch12image.py) another copy of the images: work_mat. This has all 12 channels. When channels are swapped, the contents of orig_mat are put into work_mat, and then the values of the new channels to view from work_mat are put into orig_mat.

This is big change in structure. So I will initiated a pull request that @vgenty should review. Maybe he will have a better solution more inline with his vision.

from larcv.

twongjirad avatar twongjirad commented on July 29, 2024

As promised: #26

from larcv.

vgenty avatar vgenty commented on July 29, 2024

Thanks for this fix, I don't have an issue with this method thanks for implementing. I didn't anticipate 12 channel image at all and I'm kicking myself in the butt during this whole process. The intermediate swapping matrix is necessary since with OpenCv the current set up and only operate on 3 channels at a time, swapping in and out is a fantastic addition. One more thing -- I notice that plotData had "refresh" as an input and it didn't look like it was being used so I removed, I hope this is OK

from larcv.

vgenty avatar vgenty commented on July 29, 2024

I will go in and make sure the image types -- false color and defaultimage follow the same procedure. Although as Kazu probably already mentioned it's probably better to have a standard way to load the image eliminating the need for someone to subclass PlotImage. I thought it was a good idea at the time but maybe blew up in my face when caffe interface came along. Growing pains!

from larcv.

vgenty avatar vgenty commented on July 29, 2024

forgot the commit number for plotData refresh: 57a13d1

from larcv.

twongjirad avatar twongjirad commented on July 29, 2024

Yes. Thanks for noticing the useless refresh variables! They were from a previous attempt. Then I decided to go with a new function (swap_...) entirely.

from larcv.

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.