MCPcopy Create free account
hub / github.com/RenderKit/ospray / main

Function main

apps/utility/ospConvertRawToAMR.cpp:108–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108int main(int argc, char **argv)
109{
110 bool parseSucceed = parseArguments(argc, argv);
111 if (!parseSucceed) {
112 return 1;
113 }
114
115 // ALOK: TODO:
116 // support more than float
117 std::vector<float> in;
118 if (format == "float") {
119 in = ospray::amr::mmapRAW<float>(inFileName, inDims);
120 } else {
121 throw std::runtime_error("unsupported input voxel format");
122 }
123
124 std::vector<box3i> blockBounds;
125 std::vector<int> refinementLevels;
126 std::vector<float> cellWidths;
127 std::vector<std::vector<float>> brickData;
128
129 ospray::amr::makeAMR(in,
130 inDims,
131 numLevels,
132 blockSize,
133 refinementLevel,
134 threshold,
135 blockBounds,
136 refinementLevels,
137 cellWidths,
138 brickData);
139 ospray::amr::outputAMR(outFileBase,
140 blockBounds,
141 refinementLevels,
142 cellWidths,
143 brickData,
144 blockSize);
145
146 return 0;
147}

Callers

nothing calls this directly

Calls 3

parseArgumentsFunction · 0.85
makeAMRFunction · 0.85
outputAMRFunction · 0.85

Tested by

no test coverage detected