Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6571723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:55:06+00:00 2026-05-25T14:55:06+00:00

I have a problem that I would like to tell you because is about

  • 0

I have a problem that I would like to tell you because is about some days that I don’t have new ideas.

I have an image pointed with a double* pointer, and I want to translate it into itk::smartpointer for updating the user graphic interface, for this purpose I made this method :

void prueba_r01::double2itk( double *im_proc, ImageType::Pointer *salida, int alto, int ancho)
// This method translate the double* image into itk:smartpointer image
ImageType::IndexType pixelIndex; // pixelIndex[0]= index x-axis; pixelIndex[1] = index y-axisy
ImageType::PixelType pixelValue; 
ImageType::PixelType aux; //auxiliar variable for checking the behaviour of the programm

// Doing a sweep of all the image (is in double *im_proc) translating the values into itk pointer format
for (int x=0; x<ancho; x++){ // ancho: widht of the image
    pixelIndex[0]=x;//x position
    for (int y=0; y<alto; y++){ // alto: height of the image
        pixelIndex[1]=y;//y position
        pixelValue= *(im_proc+x+ancho*y);
        (*salida)->SetPixel(pixelIndex,pixelValue);
        aux = (*salida)->GetPixel(pixelIndex); // checking that the image has been correctly transtaled from im_proc to salida-- > CHECKED
    }

}
}

And then is called here:

    //Translation of the double* image into itk:smartpointer image
    double2itk(out_inv, &(ui.imageframe->imagereader), alto, ancho); 

And after that, the user interface is updated:

 // Update of the image shonw in the user interface
ui.imageframe->update();

The problem is that it seems that everything is working correctly, but the image in the interface is not updated.
Another option also valid for my project could be to stored the image in a ‘.bmp’ or ‘.jpeg’ file.
Could someone help me? Any ideas of what is not working properly? Is there any function for creating this image files?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:55:06+00:00Added an answer on May 25, 2026 at 2:55 pm

    ITK has built-in mechanisms for this, with some considerable safety advantages. Also: they can be used in a pipeline like any image source, and because they use your existing array they will be considerably faster (I think) than looping over the indices.

    http://www.itk.org/Doxygen/html/classitk_1_1ImportImageFilter.html

    http://www.itk.org/Doxygen/html/classitk_1_1ImportImageContainer.html

    http://www.itk.org/Wiki/ITK/Examples/IO/ImportImageFilter

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an interesting genetics problem that I would like to solve in native
My problem is: I have 3 procs that would like to share config loaded
i have a timestamp problem. i would like to check a timestamp if that
I have a problem that is kind of difficult to explain. What I would
I experience strange problem. We have error handling in global.asax that would redirect user
Hey guys. Working on Mac OSX 10.6, My problem is that I would like
I have some code in my application that looks something like this: char *hash
We have some code that looks like this: class Serializer { public: template<class Type>
I have started having problems with my VPS in the way that it would
In a couple of scripts that I use I have problem that is intermittent.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.