MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

2D Outlines to 3D Surface or Solid

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27309] 2D Outlines to 3D Surface or Solid
  • From: "John C. Erb, Ph.D." <John_C_Erb at prodigy.net>
  • Date: Tue, 20 Feb 2001 03:05:18 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Monday, Feb 19, 2001

Using a series of CT images, I have made outlines of an area (volume) of
interest
as imaged on each slice.  I would like to use these 2D outlines to make
a 3D surface (or solid), so I can view the volume of interest in 3D space.

In my simplified example below, the outline is given by the x-y coordinates,
while the z coordinate is the CT slice coordinate.

I have tried several plotting routines from the ExtendGraphics by Tom
Wickham-Jones, but I have not gotten satisfactory results.  Any help
or hints would be appreciated.

Here is an Mathematica notebook example of my 2D outlines.

Thanks,
John C. Erb
email: John_C_Erb at prodigy.net

=================================================================
(* 2D OUTLINES TO 3D SURFACE NOTEBOOK *)

(* The outlines from 4 CT slices; z = 0.5 for the first slice,
  z = 1.0 for the 2nd,
    z = 1.5 for the 3rd, and z = 2.0 for the 4th *)

(* NOTE : the outlines do not have the same number of points,
  and are not regularly - spaced;
  this is as one would get when digitizing the outlines on each CT slice *)

outline05 = {{1.02259, -.00956469, .5}, {1.09041, .419046, .5}, {.822027,
    .687822, .5}, {.367525, .619458, .5}, {.132308, .831539, .5}, {-.191121,
    1.1554, .5}, {-.446603, .725824, .5}, {-.647789, .576269, .5},
    {-1.09434, .365993, .5}, {-.973041, -.017658, .5}, {-.945262, -.350991,
.5},
    {-.964632, -.807709, .5}, {-.59685, -1.05634, .5}, {-.169448, -.905903,
.5},
    {.16231, -1.0699, .5}, {.410886, -.688971, .5}, {.64615, -.564, .5},
    {1.16262, -.403277, .5}};

outline10 = {{1.74412, -.0604528, 1}, {1.34186, .662489, 1}, {1.08653,
1.22486, 1},
{.536761, 1.83872, 1}, {-.353659, 1.79741, 1}, {-1.03225,1.56513, 1},
{-1.61105, .919901, 1}, {-1.80524, .170477,1}, {-1.58627, -.535454, 1},
{-1.41569, -1.33271, 1}, {-.654148, -1.73365, 1}, {.183023, -1.91315,1},
   {.844769, -1.37113, 1}, {1.52438, -1.02213, 1}};

outline15 = {{2.246, .0740504, 1.5}, {1.8566, .790883, 1.5}, {1.56557,
        1.57265, 1.5}, {.965046, 2.09787, 1.5}, {.0319292, 2.39405,1.5},
 {-.744443, 1.95951, 1.5}, {-1.33884, 1.4973,1.5},
{-1.69596, .796889, 1.5}, {-1.80942, .0758934,1.5},
{-2.10507, -.751449, 1.5}, {-1.60214, -1.4175,1.5},
 {-1.06342, -2.01603, 1.5}, {-.200747, -1.91514, 1.5},
 {.445451, -1.75928, 1.5}, {1.11485, -1.49995, 1.5},
 {1.6223, -.898397, 1.5}};

outline20 = {{1.28354, -.017042, 2}, {.958306, .319781, 2}, {1.17057,
.946501, 2},
 {.632935, 1.104, 2}, {.185354, 1.20054, 2}, {-.223106, 1.53972,2},
 {-.626283, 1.16136, 2}, {-.938092, .755577, 2},
 {-.994709, .397014, 2}, {-1.2296, -.0169814, 2},
 {-1.35325, -.48035, 2}, {-.871178, -.777721, 2},
 {-.536557, -.868083, 2}, {-.263207, -1.33135, 2},
 {.198485, -1.38556, 2}, {.700171, -1.15322, 2},
 {1.03564, -.925754, 2}, {1.30896, -.478603, 2}};

(* Merge the outlines into one list *)
newnewkontours = {outline05, outline10, outline15, outline20}

(* Load the Graphics3D package *)
Needs["Graphics`Graphics3D`"];

(* Do a 3D Scatter Plot of the first outline only *)
ScatterPlot3D[newnewkontours[[1]], PlotJoined -> True];

(* Do a 3D Scatter Plot of all 4 outlines *)
g = Table[0, {i, Length[newnewkontours]}];
Do[
    g[[i]] =
        ScatterPlot3D[newnewkontours[[i]], PlotJoined -> True,
          DisplayFunction -> Identity];,
    {i, Length[g]}];
Show[g, DisplayFunction -> $DisplayFunction];
(* Display of 2D Outlines in 3D Space using polygons *)
Show[Graphics3D[Map[Polygon[#] &, newnewkontours]]];

(* Now make a 3D surface, or solid, of the outlines *)

========================================================================



  • Prev by Date: chaos-to -order transform
  • Next by Date: Re: RE: inverting y axis in DensityPlot
  • Previous by thread: Re:chaos-to -order transform
  • Next by thread: Re: 2D Outlines to 3D Surface or Solid