Skip to main content
added 3 characters in body
Source Link
Greg Hurst
  • 36.8k
  • 1
  • 94
  • 143

Here's something more fun than practical.

We can simulate an MRI / CT scanner by reconstructing from projected images.

g = AnatomyPlot3D[Entity["AnatomicalStructure", "LeftFemur"], PlotTheme -> "XRay"]

enter image description here

Note that it's important to have some sort of transparency in the objects being 'scanned'. This will better simulate an x-ray.

Normally a CT will only perform a half rotation, but here we will combine 2 CTs by taking a full rotation. This will give a higher quality result. Here are the simulated x-rays:

projectGraphic[g_, α_] := Show[g, ViewPoint -> {Cos[α], Sin[α], 0}, 
  ViewProjection -> "Orthographic", SphericalRegion -> True, ViewAngle -> 1.6]

fcnt = 64;
rsz = 180;

projections = Monitor[
  Table[
    Rasterize[projectGraphic[g, α], RasterSize -> rsz, ColorSpace -> "Grayscale"], 
    {α, 0, 2π - π/fcnt, π/fcnt}
  ], 
  ProgressIndicator[α, {0, 2π}]
];

ListAnimate[projections]

enter image description here

Now we can create the slices:

radons1 = Image3DSlices[ImageRotate[Image3D[projections[[1 ;; fcnt]]], {π/2, {0, -1, 0}}], All, 2];
slices1 = InverseRadon /@ radons1;

radons2 = Image3DSlices[ImageRotate[Image3D[projections[[fcnt+1 ;; -1]]], {π/2, {0, -1, 0}}], All, 2];
slices2 = InverseRadon /@ radons2;

Reconstruct the orignal object by combining both CT scans:

recon = ImageAdjust @ ImageMultiply[
  Image3D[slices1], 
  ImageRotate[Image3D[slices2], π]
];

Image3D[RidgeFilter[recon], BoxRatios -> {1, 1, 1.7}] // ImageAdjust

Here's something more fun than practical.

We can simulate an MRI / CT scanner by reconstructing from projected images.

g = AnatomyPlot3D[Entity["AnatomicalStructure", "LeftFemur"], PlotTheme -> "XRay"]

enter image description here

Note that it's important to have some sort of transparency in the objects being 'scanned'. This will better simulate an x-ray.

Normally a CT will only perform a half rotation, but here will combine 2 CTs by taking a full rotation. This will give a higher quality result. Here are the simulated x-rays:

projectGraphic[g_, α_] := Show[g, ViewPoint -> {Cos[α], Sin[α], 0}, 
  ViewProjection -> "Orthographic", SphericalRegion -> True, ViewAngle -> 1.6]

fcnt = 64;
rsz = 180;

projections = Monitor[
  Table[
    Rasterize[projectGraphic[g, α], RasterSize -> rsz, ColorSpace -> "Grayscale"], 
    {α, 0, 2π - π/fcnt, π/fcnt}
  ], 
  ProgressIndicator[α, {0, 2π}]
];

ListAnimate[projections]

enter image description here

Now we can create the slices:

radons1 = Image3DSlices[ImageRotate[Image3D[projections[[1 ;; fcnt]]], {π/2, {0, -1, 0}}], All, 2];
slices1 = InverseRadon /@ radons1;

radons2 = Image3DSlices[ImageRotate[Image3D[projections[[fcnt+1 ;; -1]]], {π/2, {0, -1, 0}}], All, 2];
slices2 = InverseRadon /@ radons2;

Reconstruct the orignal object by combining both CT scans:

recon = ImageAdjust @ ImageMultiply[
  Image3D[slices1], 
  ImageRotate[Image3D[slices2], π]
];

Image3D[RidgeFilter[recon], BoxRatios -> {1, 1, 1.7}] // ImageAdjust

Here's something more fun than practical.

We can simulate an MRI / CT scanner by reconstructing from projected images.

g = AnatomyPlot3D[Entity["AnatomicalStructure", "LeftFemur"], PlotTheme -> "XRay"]

enter image description here

Note that it's important to have some sort of transparency in the objects being 'scanned'. This will better simulate an x-ray.

Normally a CT will only perform a half rotation, but here we will combine 2 CTs by taking a full rotation. This will give a higher quality result. Here are the simulated x-rays:

projectGraphic[g_, α_] := Show[g, ViewPoint -> {Cos[α], Sin[α], 0}, 
  ViewProjection -> "Orthographic", SphericalRegion -> True, ViewAngle -> 1.6]

fcnt = 64;
rsz = 180;

projections = Monitor[
  Table[
    Rasterize[projectGraphic[g, α], RasterSize -> rsz, ColorSpace -> "Grayscale"], 
    {α, 0, 2π - π/fcnt, π/fcnt}
  ], 
  ProgressIndicator[α, {0, 2π}]
];

ListAnimate[projections]

enter image description here

Now we can create the slices:

radons1 = Image3DSlices[ImageRotate[Image3D[projections[[1 ;; fcnt]]], {π/2, {0, -1, 0}}], All, 2];
slices1 = InverseRadon /@ radons1;

radons2 = Image3DSlices[ImageRotate[Image3D[projections[[fcnt+1 ;; -1]]], {π/2, {0, -1, 0}}], All, 2];
slices2 = InverseRadon /@ radons2;

Reconstruct the orignal object by combining both CT scans:

recon = ImageAdjust @ ImageMultiply[
  Image3D[slices1], 
  ImageRotate[Image3D[slices2], π]
];

Image3D[RidgeFilter[recon], BoxRatios -> {1, 1, 1.7}] // ImageAdjust
deleted 3 characters in body
Source Link
Greg Hurst
  • 36.8k
  • 1
  • 94
  • 143

Here's something more fun than practical.

We can simulate an MRI / CT scanner by reconstructing from projected images.

g = AnatomyPlot3D[Entity["AnatomicalStructure", "LeftFemur"], PlotTheme -> "XRay"]

enter image description here

Note that it's important to have some sort of transparency in the objects being 'scanned'. This will better simulate an x-ray.

Normally a CT will only perform a half rotation, but here will combine 2 CTs by taking a full rotation. This will give a higher quality result. Here are the simulated x-rays:

projectGraphic[g_, α_] := Show[g, ViewPoint -> {Cos[α], Sin[α], 0}, 
  ViewProjection -> "Orthographic", SphericalRegion -> True, ViewAngle -> 1.6]

fcnt = 256;64;
rsz = 180;

projections = Monitor[
  Table[
    Rasterize[projectGraphic[g, α], RasterSize -> rsz, ColorSpace -> "Grayscale"], 
    {α, 0, 2π - π/fcnt, π/fcnt}
  ], 
  ProgressIndicator[α, {0, 2π}]
];

ListAnimate[projections]

enter image description here

Now we can create the slices:

radons1 = Image3DSlices[ImageRotate[Image3D[projections[[1 ;; fcnt]]], {π/2, {0, -1, 0}}], All, 2];
slices1 = InverseRadon /@ radons1;

radons2 = Image3DSlices[ImageRotate[Image3D[projections[[fcnt+1 ;; -1]]], {π/2, {0, -1, 0}}], All, 2];
slices2 = InverseRadon /@ radons2;

Reconstruct the orignal object by combining both CT scans:

recon = ImageAdjust @ ImageMultiply[
  Image3D[slices1], 
  ImageRotate[Image3D[slices2], π]
];

Image3D[RidgeFilter[recon], BoxRatios -> {1, 1, 1.7}] // ImageAdjust

Here's something more fun than practical.

We can simulate an MRI / CT scanner by reconstructing from projected images.

g = AnatomyPlot3D[Entity["AnatomicalStructure", "LeftFemur"], PlotTheme -> "XRay"]

enter image description here

Note that it's important to have some sort of transparency in the objects being 'scanned'. This will better simulate an x-ray.

Normally a CT will only perform a half rotation, but here will combine 2 CTs by taking a full rotation. This will give a higher quality result. Here are the simulated x-rays:

projectGraphic[g_, α_] := Show[g, ViewPoint -> {Cos[α], Sin[α], 0}, 
  ViewProjection -> "Orthographic", SphericalRegion -> True, ViewAngle -> 1.6]

fcnt = 256;
rsz = 180;

projections = Monitor[
  Table[
    Rasterize[projectGraphic[g, α], RasterSize -> rsz, ColorSpace -> "Grayscale"], 
    {α, 0, 2π - π/fcnt, π/fcnt}
  ], 
  ProgressIndicator[α, {0, 2π}]
];

ListAnimate[projections]

enter image description here

Now we can create the slices:

radons1 = Image3DSlices[ImageRotate[Image3D[projections[[1 ;; fcnt]]], {π/2, {0, -1, 0}}], All, 2];
slices1 = InverseRadon /@ radons1;

radons2 = Image3DSlices[ImageRotate[Image3D[projections[[fcnt+1 ;; -1]]], {π/2, {0, -1, 0}}], All, 2];
slices2 = InverseRadon /@ radons2;

Reconstruct the orignal object by combining both CT scans:

recon = ImageAdjust @ ImageMultiply[
  Image3D[slices1], 
  ImageRotate[Image3D[slices2], π]
];

Image3D[RidgeFilter[recon], BoxRatios -> {1, 1, 1.7}] // ImageAdjust

Here's something more fun than practical.

We can simulate an MRI / CT scanner by reconstructing from projected images.

g = AnatomyPlot3D[Entity["AnatomicalStructure", "LeftFemur"], PlotTheme -> "XRay"]

enter image description here

Note that it's important to have some sort of transparency in the objects being 'scanned'. This will better simulate an x-ray.

Normally a CT will only perform a half rotation, but here will combine 2 CTs by taking a full rotation. This will give a higher quality result. Here are the simulated x-rays:

projectGraphic[g_, α_] := Show[g, ViewPoint -> {Cos[α], Sin[α], 0}, 
  ViewProjection -> "Orthographic", SphericalRegion -> True, ViewAngle -> 1.6]

fcnt = 64;
rsz = 180;

projections = Monitor[
  Table[
    Rasterize[projectGraphic[g, α], RasterSize -> rsz, ColorSpace -> "Grayscale"], 
    {α, 0, 2π - π/fcnt, π/fcnt}
  ], 
  ProgressIndicator[α, {0, 2π}]
];

ListAnimate[projections]

enter image description here

Now we can create the slices:

radons1 = Image3DSlices[ImageRotate[Image3D[projections[[1 ;; fcnt]]], {π/2, {0, -1, 0}}], All, 2];
slices1 = InverseRadon /@ radons1;

radons2 = Image3DSlices[ImageRotate[Image3D[projections[[fcnt+1 ;; -1]]], {π/2, {0, -1, 0}}], All, 2];
slices2 = InverseRadon /@ radons2;

Reconstruct the orignal object by combining both CT scans:

recon = ImageAdjust @ ImageMultiply[
  Image3D[slices1], 
  ImageRotate[Image3D[slices2], π]
];

Image3D[RidgeFilter[recon], BoxRatios -> {1, 1, 1.7}] // ImageAdjust
deleted 3 characters in body
Source Link
Greg Hurst
  • 36.8k
  • 1
  • 94
  • 143

Here's something more fun than practical.

We can simulate an MRI / CT scanner by reconstructing from projected images.

g = AnatomyPlot3D[Entity["AnatomicalStructure", "LeftFemur"], PlotTheme -> "XRay"]

enter image description here

Note that it's important to have some sort of transparency in the objects being 'scanned'. This will better simulate an x-ray.

Normally a CT will only perform a half rotation, but here will combine 2 CTs by taking a full rotation. This will give a higher quality result. Here are the simulated x-rays:

projectGraphic[g_, α_] := Show[g, ViewPoint -> {Cos[α], Sin[α], 0}, 
  ViewProjection -> "Orthographic", SphericalRegion -> True, 
  ViewAngle -> 1.6]

fcnt = 256;
rsz = 180;

projections = Monitor[
  Table[
    Rasterize[projectGraphic[g, α], RasterSize -> rsz, ColorSpace -> "Grayscale"], 
    {α, 0, 2π - π/fcnt, π/fcnt}
  ], 
  ProgressIndicator[α, {0, π}]
];

ListAnimate[projections]

enter image description here

Now we can create the slices:

radons1 = Image3DSlices[ImageRotate[Image3D[projections[[1 ;; fcnt]]], {π/2, {0, -1, 0}}], All, 2];
slices1 = InverseRadon /@ radons1;

radons2 = Image3DSlices[ImageRotate[Image3D[projections[[fcnt+1 ;; -1]]], {π/2, {0, -1, 0}}], All, 2];
slices2 = InverseRadon /@ radons2;

Reconstruct the orignal object by combining both CT scans:

recon = ImageAdjust @ ImageMultiply[
  Image3D[slices1], 
  ImageRotate[Image3D[slices2], π]
];

Image3D[RidgeFilter[recon], BoxRatios -> {1, 1, 1.7}] // ImageAdjust

Here's something more fun than practical.

We can simulate an MRI / CT scanner by reconstructing from projected images.

g = AnatomyPlot3D[Entity["AnatomicalStructure", "LeftFemur"], PlotTheme -> "XRay"]

enter image description here

Note it's important to have some sort of transparency in the objects being 'scanned'. This will better simulate an x-ray.

Normally a CT will only perform a half rotation, but here will combine 2 CTs by taking a full rotation. This will give a higher quality result. Here are the simulated x-rays:

projectGraphic[g_, α_] := Show[g, ViewPoint -> {Cos[α], Sin[α], 0}, 
  ViewProjection -> "Orthographic", SphericalRegion -> True, 
  ViewAngle -> 1.6]

fcnt = 256;
rsz = 180;

projections = Monitor[
  Table[
    Rasterize[projectGraphic[g, α], RasterSize -> rsz, ColorSpace -> "Grayscale"], 
    {α, 0, 2π - π/fcnt, π/fcnt}], 
  ProgressIndicator[α, {0, π}]
];

ListAnimate[projections]

enter image description here

Now we can create the slices:

radons1 = Image3DSlices[ImageRotate[Image3D[projections[[1 ;; fcnt]]], {π/2, {0, -1, 0}}], All, 2];
slices1 = InverseRadon /@ radons1;

radons2 = Image3DSlices[ImageRotate[Image3D[projections[[fcnt+1 ;; -1]]], {π/2, {0, -1, 0}}], All, 2];
slices2 = InverseRadon /@ radons2;

Reconstruct the orignal object by combining both CT scans:

recon = ImageAdjust @ ImageMultiply[
  Image3D[slices1], 
  ImageRotate[Image3D[slices2], π]
];

Image3D[RidgeFilter[recon], BoxRatios -> {1, 1, 1.7}] // ImageAdjust

Here's something more fun than practical.

We can simulate an MRI / CT scanner by reconstructing from projected images.

g = AnatomyPlot3D[Entity["AnatomicalStructure", "LeftFemur"], PlotTheme -> "XRay"]

enter image description here

Note that it's important to have some sort of transparency in the objects being 'scanned'. This will better simulate an x-ray.

Normally a CT will only perform a half rotation, but here will combine 2 CTs by taking a full rotation. This will give a higher quality result. Here are the simulated x-rays:

projectGraphic[g_, α_] := Show[g, ViewPoint -> {Cos[α], Sin[α], 0}, 
  ViewProjection -> "Orthographic", SphericalRegion -> True, ViewAngle -> 1.6]

fcnt = 256;
rsz = 180;

projections = Monitor[
  Table[
    Rasterize[projectGraphic[g, α], RasterSize -> rsz, ColorSpace -> "Grayscale"], 
    {α, 0, 2π - π/fcnt, π/fcnt}
  ], 
  ProgressIndicator[α, {0, }]
];

ListAnimate[projections]

enter image description here

Now we can create the slices:

radons1 = Image3DSlices[ImageRotate[Image3D[projections[[1 ;; fcnt]]], {π/2, {0, -1, 0}}], All, 2];
slices1 = InverseRadon /@ radons1;

radons2 = Image3DSlices[ImageRotate[Image3D[projections[[fcnt+1 ;; -1]]], {π/2, {0, -1, 0}}], All, 2];
slices2 = InverseRadon /@ radons2;

Reconstruct the orignal object by combining both CT scans:

recon = ImageAdjust @ ImageMultiply[
  Image3D[slices1], 
  ImageRotate[Image3D[slices2], π]
];

Image3D[RidgeFilter[recon], BoxRatios -> {1, 1, 1.7}] // ImageAdjust
Source Link
Greg Hurst
  • 36.8k
  • 1
  • 94
  • 143
Loading