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

  • SEARCH
  • Home
  • 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 76137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:37:34+00:00 2026-05-10T20:37:34+00:00

A cancer CT picture is stored inside a unsigned short array (1-dimensional). I have

  • 0

A cancer CT picture is stored inside a unsigned short array (1-dimensional).

I have the location information of the cancer region inside the picture, but the coordinates (x,y) are in superpixel (128×128 unsigned short). My task is to highlight this region.

I already solved this one by converting superpixel coordinates into a offset a can use for the unsigned short array. It works fine but i wonder if there is a smarter way to solve this problem, since my solution needs 3 nested for-loops.

Is it possible to access the ushort array ‘superpixelwise’, so i can navigate the ushort array in superpixels.

I know this does not work. To give you an idea what I was thinking of:

typedef struct  {    unsigned short[128x128] }  spix;  spix *spixptr;  unsigned short * bufptr = img->getBuf();  spixptr = bufptr; 

Update 1:

Yep its vague, let me try again with a picture:

[0][1][2] ... [127]| ... [x] | [1]                |         | [2]                |         | .                  |         | .                  | <-- this is a superpixel .                  |         | [127]              |         | --------------------         | .                            | .                            | .                            | [y]                          |<--whole picture stored in a ushort* buf = new ushort[x*y] ------------------------------ 

I like to access the 128×128 ushorts at once with a pointer, so I can memcpy data into the 128×128 field.

Update 2:

The bitblit transfer hint helped a lot.

  • 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. 2026-05-10T20:37:35+00:00Added an answer on May 10, 2026 at 8:37 pm

    From what I understand you have:

    • A large image that is a CT scan
    • A rectangular area within that image that is a cancer

    Then it gets a bit harder to understand. I believe you want to create some sort of class so that you can effectively access 128×128 blocks of the image as if they were a single pixel.

    So if the image was 1024×1024 pixels you’d want to be able to access it as a 8×8 grid of 128×128 pixel blocks. Now if this is the case what you need is to create a class that represents one of these 128×128 blocks. This class should reference the image, so that you don’t copy the image data, and should contain all of the operations that you’d want to do on that ‘superpixel’.

    However if all you want to do is to be able to extract out a particular 128×128 block from the larger image then what you need is the bit blit algorithm. The bit block transfer (usually called just blit) will allow you to copy the selected bit of data from the larger image to a smaller one. The algorithm can also be adapted to do almost anything you want to a particular area in the larger image.

    If a blit is all you need then every relatively modern graphics API should have blit function(s).

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

Sidebar

Ask A Question

Stats

  • Questions 77k
  • Answers 77k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer in functional terms this is a combination of : zip… May 11, 2026 at 3:23 pm
  • added an answer To append content to a document, you should only call… May 11, 2026 at 3:23 pm
  • added an answer TCP guarantees order. So I will just assume you are… May 11, 2026 at 3:23 pm

Related Questions

My workplace is planning on moving to Team Foundation Server and it's not a
The basic idea behind a Cancel button is to enable closing your window with
I have a form with a progress bar and a cancel button which is
Background: I have a form with a clear form and a cancel button. If

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.