Giter Club home page Giter Club logo

Comments (5)

Hakkk2002 avatar Hakkk2002 commented on July 29, 2024

What if in itk::CudaImage::SetPixelContainer, besides passing the pixel container, also pass the cuda data manager and retain the CPU/GPU dirty flags of the manager? Maybe this works for the case of itk::ChangeInformationImageFilter but I don't know if it is generic for all cases that calls itk::CudaImage::SetPixelContainer.

from rtk.

Hakkk2002 avatar Hakkk2002 commented on July 29, 2024

Well, this seems more complicated than what I thought... it needs a method to obtain the data manager from the pixel container...

from rtk.

SimonRit avatar SimonRit commented on July 29, 2024

I see two solutions at this stage:

  • modifying itk::ChangeInformationImageFilter to make sure that the CPU buffer is up-to-date. I think the same problem will occur with itk::GPUImage (for OpenCL) so it's worth posting a patch to ITK.
  • create a CudaImage specific ChangeInformationImageFilter.

from rtk.

Hakkk2002 avatar Hakkk2002 commented on July 29, 2024

I've done a little bit more investigation and the previous thought may be wrong.
itk::ChangeInformationImageFilter::GenerateData() calls nonConstInput->GetPixelContainer() to get the pixel container of the input, which does a force update of CPU buffer.

I am thinking if it is because although itk::ChangeInformationImageFilter does update the input CPU buffer but it doesn't point the CudaDataManager::m_CPUBuffer of the output to the updated CPU buffer of the input (or, this may be done by SetPixelContainer of CudaImage, like once the pixel container has been reassigned, take care of the m_CPUBuffer as well).

from rtk.

SimonRit avatar SimonRit commented on July 29, 2024

Problem fixed by commit 82ba699.

from rtk.

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.