# How to save picture with numerical data?

This animation shows LHC detector architecture

Animation has been generated from 3D image saved as .nb file

From 3D image d we can retrieve data about every element position in space, for example

d[[1, 1]]

Out[]= {RGBColor[7/(3 Sqrt[6]), Sqrt[2/3]/3, 1/(3 Sqrt[6])],
Opacity[0.15],
GeometricTransformation[
Cuboid[{-8.4, -36, -0.15}, {8.4, 36,
0.15}], {{{0.0784591, -0.996917, 0}, {-0.996917, -0.0784591,
0}, {0, 0, -1}}, {-65.7965, -5.1783, -1502.5}}]}

d[[1, 2]]

Out[]= {RGBColor[7/Sqrt[57], 2/Sqrt[57], 2/Sqrt[57]], Opacity[0.15],
GeometricTransformation[
Cuboid[{-8.4, -36, -0.15}, {8.4, 36,
0.15}], {{{0.0461835, -0.998933, 0}, {-0.998933, -0.0461835,
0}, {0, 0, -1}}, {-139.851, -6.46568, -1502}}]}


Totally we have

Length[d[[1, All]]]

Out[]= 18728


module described as cuboids with different size, position and orientation. The question is how we can save 3D image d with data using other format?

Minimal working example.

data={{RGBColor[7/(3 Sqrt[6]), Sqrt[2/3]/3, 1/(3 Sqrt[6])], Opacity[0.15],
GeometricTransformation[
Cuboid[{-8.4, -36, -0.15}, {8.4, 36,
0.15}], {{{0.0784591, -0.996917, 0}, {-0.996917, -0.0784591,
0}, {0, 0, -1}}, {-65.7965, -5.1783, -1502.5}}]}, {RGBColor[7/
Sqrt[57], 2/Sqrt[57], 2/Sqrt[57]], Opacity[0.15],
GeometricTransformation[
Cuboid[{-8.4, -36, -0.15}, {8.4, 36,
0.15}], {{{0.0461835, -0.998933, 0}, {-0.998933, -0.0461835,
0}, {0, 0, -1}}, {-139.851, -6.46568, -1502}}]}, {RGBColor[7/
Sqrt[62], Sqrt[2/31], 3/Sqrt[62]], Opacity[0.15],
GeometricTransformation[
Cuboid[{-8.4, -36, -0.15}, {8.4, 36,
0.15}], {{{0.138156, -0.99041, 0}, {-0.99041, -0.138156, 0}, {0,
0, -1}}, {-138.657, -19.3419, -1498}}]}, {RGBColor[7/Sqrt[69],
2/Sqrt[69], 4/Sqrt[69]], Opacity[0.15],
GeometricTransformation[
Cuboid[{-8.4, -36, -0.15}, {8.4, 36,
0.15}], {{{0.233445, -0.97237, 0}, {-0.97237, -0.233445, 0}, {0,
0, -1}}, {-64.1764, -15.4074, -1498}}]}, {RGBColor[7/Sqrt[78],
Sqrt[2/39], 5/Sqrt[78]], Opacity[0.15],
GeometricTransformation[
Cuboid[{-8.4, -36, -0.15}, {8.4, 36,
0.15}], {{{0.228951, -0.973438, 0}, {-0.973438, -0.228951,
0}, {0, 0, -1}}, {-136.281, -32.0531, -1502}}]}, {RGBColor[7/
Sqrt[89], 2/Sqrt[89], 6/Sqrt[89]], Opacity[0.15],
GeometricTransformation[
Cuboid[{-8.4, -36, -0.15}, {8.4, 36,
0.15}], {{{0.382683, -0.92388, 0}, {-0.92388, -0.382683, 0}, {0,
0, -1}}, {-60.976, -25.2571, -1502}}]}, {RGBColor[7/Sqrt[102],
Sqrt[2/51], 7/Sqrt[102]], Opacity[0.15],
GeometricTransformation[
Cuboid[{-8.4, -36, -0.15}, {8.4, 36,
0.15}], {{{0.317791, -0.948161, 0}, {-0.948161, -0.317791,
0}, {0, 0, -1}}, {-132.742, -44.4908, -1498}}]}, {RGBColor[7/(
3 Sqrt[13]), 2/(3 Sqrt[13]), 8/(3 Sqrt[13])], Opacity[0.15],
GeometricTransformation[
Cuboid[{-8.4, -36, -0.15}, {8.4, 36,
0.15}], {{{0.403921, -0.914794, 0}, {-0.914794, -0.403921,
0}, {0, 0, -1}}, {-128.071, -56.5489, -1502}}]}, {RGBColor[7/
Sqrt[134], Sqrt[2/67], 9/Sqrt[134]], Opacity[0.15],
GeometricTransformation[
Cuboid[{-8.4, -36, -0.15}, {8.4, 36,
0.15}], {{{0.522499, -0.85264, 0}, {-0.85264, -0.522499, 0}, {0,
0, -1}}, {-56.2743, -34.4849, -1497.5}}]}, {RGBColor[7/(
3 Sqrt[17]), 2/(3 Sqrt[17]), 10/(3 Sqrt[17])], Opacity[0.15],
GeometricTransformation[
Cuboid[{-8.4, -36, -0.15}, {8.4, 36,
0.15}], {{{0.486604, -0.873622, 0}, {-0.873622, -0.486604,
0}, {0, 0, -1}}, {-122.307, -68.1246, -1498}}]}};


Visualization

Graphics3D[data, Boxed -> False]


Now we can save 3D image shown above as .nb file, and then we can retrieve data from this image as data=image[[1,All]]. The question is about other available format to save image with data in it.

• How do you define image? And what is not good about the approach you have now? Commented Mar 15 at 18:10
• @user21 In minimal working example remove data and save 3D image as .nb file. Then call it and rename 3D image as image=... same as d shown above. .nb is nice format for Mathematica users only. Commented Mar 16 at 11:41