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 590529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:32:22+00:00 2026-05-13T15:32:22+00:00

I have 25 2D images (of equal size), each image represents one layer equally

  • 0

I have 25 2D images (of equal size), each image represents one layer equally spaced. Each image is in grayscale and black color (or values equal 0 in data matrix after importing it) is the background that needs to be removed.

And my questions are:

  • How to combine these 25 images to one 3D image? How to draw each one with some space between?

  • How to remove the background color? Is it possible to create some kind of colorscale where values equal 0 will be transparent?

A little additional data:

  • These images are in DCM format (DICOM images) and I import them using dicomread function.

  • Each image (320×320 px) represents one layer that is 4 mm thick and spacing between layers is 1,2 mm. We can assume, that width of each image is about 120-125 mm

  • 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-13T15:32:23+00:00Added an answer on May 13, 2026 at 3:32 pm

    2D into 3D matrix:

    >> a = magic(3)
    
    a =
    
         8     1     6
         3     5     7
         4     9     2
    
    >> b = ones(3)
    
    b =
    
         1     1     1
         1     1     1
         1     1     1
    
    >> c = zeros(3)
    
    c =
    
         0     0     0
         0     0     0
         0     0     0
    
    >> d(:,:,1)= a
    
    d =
    
         8     1     6
         3     5     7
         4     9     2
    
    >> d(:,:,2)= b
    
    d(:,:,1) =
    
         8     1     6
         3     5     7
         4     9     2
    
    
    d(:,:,2) =
    
         1     1     1
         1     1     1
         1     1     1
    
    >> d(:,:,3)= c
    
    d(:,:,1) =
    
         8     1     6
         3     5     7
         4     9     2
    
    
    d(:,:,2) =
    
         1     1     1
         1     1     1
         1     1     1
    
    
    d(:,:,3) =
    
         0     0     0
         0     0     0
         0     0     0
    

    Transparency:

    Set the transparent voxels to a value of NaN. Most graphics just leave NaN as empty space.

    Related projects

    You are likely to be interested in SliceOMatic

    My first project at The MathWorks was a demo similar to yours. It was reconstruction of a 3-D solid from planar slices (unregistered). Most of the work was in the registration.

    This is a related project also that might be of interest.

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

Sidebar

Related Questions

I have three divs page-left page-right flipper I have images of equal size in
I have about 1000 PNG images (tiles) of equal size (32px x 32px). They
I have a uiscrollview with contentsize 1280*1280 and 25 images of equal size loaded
I have 3 images E1,E2,E3 of equal size 256*256*3. Now by some any arbitrary
I have to write HTML with Image and anchor tag. The size of images
I have images that need to scale to the screen's size. The images will
Firstly a short description of what I have Images of the same size and
We have two images with transparent sections that each have a map and separately
I currently have a UIScrollView which has a content size equal to about 50
I have some some rows of image thumbs inside anchors inside a div, one

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.