@@ -28,7 +28,7 @@ using namespace std::string_view_literals;
2828namespace tsd ::io {
2929
3030template <typename T>
31- void doExportStructuredRegularVolumeToNanoVDB (const T *data,
31+ void doExportStructuredVolumeToNanoVDB (const T *data,
3232 math::float3 origin,
3333 math::float3 spacing,
3434 math::int3 dims,
@@ -39,17 +39,17 @@ void doExportStructuredRegularVolumeToNanoVDB(const T *data,
3939 bool enableDithering)
4040{
4141 tsd::core::logStatus (
42- " [export_StructuredRegularVolumeToNanoVDB ] Volume dimensions: %u x %u x %u" ,
42+ " [export_StructuredVolumeToNanoVDB ] Volume dimensions: %u x %u x %u" ,
4343 dims.x ,
4444 dims.y ,
4545 dims.z );
4646 tsd::core::logStatus (
47- " [export_StructuredRegularVolumeToNanoVDB ] Origin: (%.3f, %.3f, %.3f)" ,
47+ " [export_StructuredVolumeToNanoVDB ] Origin: (%.3f, %.3f, %.3f)" ,
4848 origin.x ,
4949 origin.y ,
5050 origin.z );
5151 tsd::core::logStatus (
52- " [export_StructuredRegularVolumeToNanoVDB ] Spacing: (%.3f, %.3f, %.3f)" ,
52+ " [export_StructuredVolumeToNanoVDB ] Spacing: (%.3f, %.3f, %.3f)" ,
5353 spacing.x ,
5454 spacing.y ,
5555 spacing.z );
@@ -142,7 +142,7 @@ void doExportStructuredRegularVolumeToNanoVDB(const T *data,
142142 : 0 .0f ;
143143
144144 tsd::core::logStatus (
145- " [export_StructuredRegularVolumeToNanoVDB ] Active voxels: %zu/%zu (%.1f%% inactive cell compression)" ,
145+ " [export_StructuredVolumeToNanoVDB ] Active voxels: %zu/%zu (%.1f%% inactive cell compression)" ,
146146 activeVoxelsCount,
147147 totalVoxelsCount,
148148 inactiveCellCompression * 100 .0f );
@@ -152,11 +152,11 @@ void doExportStructuredRegularVolumeToNanoVDB(const T *data,
152152 // Validate quantization choice
153153 if (precision == VDBPrecision::Fp4 && valueRange > 30 .0f ) {
154154 tsd::core::logWarning (
155- " [export_StructuredRegularVolumeToNanoVDB ] Fp4 quantization with value range %.2f may introduce significant error (recommended < 30.0)" ,
155+ " [export_StructuredVolumeToNanoVDB ] Fp4 quantization with value range %.2f may introduce significant error (recommended < 30.0)" ,
156156 valueRange);
157157 } else if (precision == VDBPrecision::Fp8 && valueRange > 500 .0f ) {
158158 tsd::core::logWarning (
159- " [export_StructuredRegularVolumeToNanoVDB ] Fp8 quantization with value range %.2f may introduce significant error (recommended < 500.0)" ,
159+ " [export_StructuredVolumeToNanoVDB ] Fp8 quantization with value range %.2f may introduce significant error (recommended < 500.0)" ,
160160 valueRange);
161161 }
162162
@@ -203,7 +203,7 @@ void doExportStructuredRegularVolumeToNanoVDB(const T *data,
203203 break ;
204204 case VDBPrecision::Half:
205205 tsd::core::logWarning (
206- " [export_StructuredRegularVolumeToNanoVDB ] Half precision not supported in this NanoVDB build, using Fp16 instead" );
206+ " [export_StructuredVolumeToNanoVDB ] Half precision not supported in this NanoVDB build, using Fp16 instead" );
207207 handle = nanovdb::tools::createNanoGrid<nanovdb::tools::build::Grid<float >,
208208 nanovdb::Fp16>(*buildGrid,
209209 nanovdb::tools::StatsMode::All,
@@ -215,7 +215,7 @@ void doExportStructuredRegularVolumeToNanoVDB(const T *data,
215215
216216 if (!handle) {
217217 tsd::core::logError (
218- " [export_StructuredRegularVolumeToNanoVDB ] Failed to create NanoVDB grid." );
218+ " [export_StructuredVolumeToNanoVDB ] Failed to create NanoVDB grid." );
219219 return ;
220220 }
221221
@@ -229,12 +229,12 @@ void doExportStructuredRegularVolumeToNanoVDB(const T *data,
229229 : 0 .0f ;
230230
231231 tsd::core::logStatus (
232- " [export_StructuredRegularVolumeToNanoVDB ] Quantization compression: %.1f%% (%.2f MB -> %.2f MB)" ,
232+ " [export_StructuredVolumeToNanoVDB ] Quantization compression: %.1f%% (%.2f MB -> %.2f MB)" ,
233233 quantizationCompression * 100 .0f ,
234234 uncompressedActiveSize / (1024 .0f * 1024 .0f ),
235235 finalSize / (1024 .0f * 1024 .0f ));
236236 tsd::core::logStatus (
237- " [export_StructuredRegularVolumeToNanoVDB ] Total compression: %.1f%% (%.2f MB -> %.2f MB)" ,
237+ " [export_StructuredVolumeToNanoVDB ] Total compression: %.1f%% (%.2f MB -> %.2f MB)" ,
238238 totalCompression * 100 .0f ,
239239 uncompressedSize / (1024 .0f * 1024 .0f ),
240240 finalSize / (1024 .0f * 1024 .0f ));
@@ -244,16 +244,16 @@ void doExportStructuredRegularVolumeToNanoVDB(const T *data,
244244 nanovdb::io::writeGrid (
245245 std::string (outputFilename).c_str (), handle, nanovdb::io::Codec::NONE);
246246 tsd::core::logStatus (
247- " [export_StructuredRegularVolumeToNanoVDB ] Successfully wrote VDB file: %s" ,
247+ " [export_StructuredVolumeToNanoVDB ] Successfully wrote VDB file: %s" ,
248248 std::string (outputFilename).c_str ());
249249 } catch (const std::exception &e) {
250250 tsd::core::logError (
251- " [export_StructuredRegularVolumeToNanoVDB ] Failed to write VDB file: %s" ,
251+ " [export_StructuredVolumeToNanoVDB ] Failed to write VDB file: %s" ,
252252 e.what ());
253253 }
254254}
255255
256- void export_StructuredRegularVolumeToNanoVDB (const SpatialField *spatialField,
256+ void export_StructuredVolumeToNanoVDB (const SpatialField *spatialField,
257257 std::string_view outputFilename,
258258 bool useUndefinedValue,
259259 float undefinedValue,
@@ -268,7 +268,7 @@ void export_StructuredRegularVolumeToNanoVDB(const SpatialField *spatialField,
268268
269269 if (!isStructuredRegular && !isStructuredRectilinear) {
270270 tsd::core::logError (
271- " [export_StructuredRegularVolumeToNanoVDB ] Not a structured volume." );
271+ " [export_StructuredVolumeToNanoVDB ] Not a structured volume." );
272272 return ;
273273 }
274274
@@ -281,14 +281,13 @@ void export_StructuredRegularVolumeToNanoVDB(const SpatialField *spatialField,
281281 // Dumb heuristic here: everything but cell is node-centered
282282 const bool cellCentered = dataCentering == " cell" sv;
283283
284- tsd::core::logStatus (
285- " [export_StructuredRegularVolumeToNanoVDB] Data centering: %s" ,
284+ tsd::core::logStatus (" [export_StructuredVolumeToNanoVDB] Data centering: %s" ,
286285 dataCentering.c_str ());
287286
288287 const auto *volumeData = spatialField->parameterValueAsObject <Array>(" data" );
289288 if (!volumeData) {
290289 tsd::core::logError (
291- " [export_StructuredRegularVolumeToNanoVDB ] No volume data found." );
290+ " [export_StructuredVolumeToNanoVDB ] No volume data found." );
292291 return ;
293292 }
294293
@@ -334,7 +333,7 @@ void export_StructuredRegularVolumeToNanoVDB(const SpatialField *spatialField,
334333
335334 if (!axisX || !axisY || !axisZ) {
336335 tsd::core::logError (
337- " [export_StructuredRegularVolumeToNanoVDB ] Missing rectilinear coordinates." );
336+ " [export_StructuredVolumeToNanoVDB ] Missing rectilinear coordinates." );
338337 return ;
339338 }
340339
@@ -359,13 +358,13 @@ void export_StructuredRegularVolumeToNanoVDB(const SpatialField *spatialField,
359358 if (!copyAxis (axisX, coordsX) || !copyAxis (axisY, coordsY)
360359 || !copyAxis (axisZ, coordsZ)) {
361360 tsd::core::logError (
362- " [export_StructuredRegularVolumeToNanoVDB ] Rectilinear coordinates must be float or double." );
361+ " [export_StructuredVolumeToNanoVDB ] Rectilinear coordinates must be float or double." );
363362 return ;
364363 }
365364
366365 if (coordsX.size () < 2 || coordsY.size () < 2 || coordsZ.size () < 2 ) {
367366 tsd::core::logError (
368- " [export_StructuredRegularVolumeToNanoVDB ] Rectilinear coordinates must have at least two entries per axis." );
367+ " [export_StructuredVolumeToNanoVDB ] Rectilinear coordinates must have at least two entries per axis." );
369368 return ;
370369 }
371370
@@ -387,7 +386,7 @@ void export_StructuredRegularVolumeToNanoVDB(const SpatialField *spatialField,
387386 }
388387
389388 auto dispatchExport = [&](auto ptr) {
390- doExportStructuredRegularVolumeToNanoVDB (ptr,
389+ doExportStructuredVolumeToNanoVDB (ptr,
391390 origin,
392391 spacing,
393392 dims,
@@ -419,7 +418,7 @@ void export_StructuredRegularVolumeToNanoVDB(const SpatialField *spatialField,
419418 break ;
420419 default :
421420 tsd::core::logError (
422- " [export_StructuredRegularVolumeToNanoVDB ] Volume data is not of a supported float type." );
421+ " [export_StructuredVolumeToNanoVDB ] Volume data is not of a supported float type." );
423422 return ;
424423 }
425424
@@ -428,12 +427,11 @@ void export_StructuredRegularVolumeToNanoVDB(const SpatialField *spatialField,
428427 std::string sidecarError;
429428 if (!writeSidecar (sidecar, sidecarPath, sidecarError)) {
430429 tsd::core::logWarning (
431- " [export_StructuredRegularVolumeToNanoVDB ] Failed to write sidecar %s: %s" ,
430+ " [export_StructuredVolumeToNanoVDB ] Failed to write sidecar %s: %s" ,
432431 sidecarPath.string ().c_str (),
433432 sidecarError.c_str ());
434433 } else {
435- tsd::core::logStatus (
436- " [export_StructuredRegularVolumeToNanoVDB] Wrote sidecar: %s" ,
434+ tsd::core::logStatus (" [export_StructuredVolumeToNanoVDB] Wrote sidecar: %s" ,
437435 sidecarPath.string ().c_str ());
438436 }
439437}
0 commit comments