Skip to content

Commit fd36a7a

Browse files
committed
add missing parameters to export config, #BUILD
1 parent 9f3adb5 commit fd36a7a

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

MainWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
<CheckBox x:Name="chkGetAvgTileTimestamp" Content="Get Average timestamp per Tile" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="{DynamicResource MainText}" IsChecked="False" ToolTip="Experimental: Calculate average raw gps_time from tile points and save into pcroot"/>
149149
<CheckBox x:Name="chkCalculateOverlappingTiles" Content="Calculate overlapping tiles" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="{DynamicResource MainText}" IsChecked="False" ToolTip="Experimental: Save additional overlapped tile data into pcroot (if tile overlaps another tile)"/>
150150
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Horizontal">
151-
<CheckBox x:Name="chkUseMemoryLimit" Content="Memory limit:" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="{DynamicResource MainText}" ToolTip="Limit memory usage, Default is 8gb per thread!"/>
151+
<CheckBox x:Name="chkUseMemoryLimit" Content="Memory limit:" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="{DynamicResource MainText}" ToolTip="Limit memory usage, Default is max available PER Thread!"/>
152152
<TextBox x:Name="txtMemoryLimit" HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" VerticalAlignment="Top" Width="40" Text="8"/>
153153
<Label Content="GB *Per Thread" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Foreground="{DynamicResource MainText}"/>
154154
</StackPanel>

MainWindow.xaml.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ private static async Task ProcessAllFiles(object workerParamsObject)
264264
return;
265265
}
266266

267-
stopwatch .Reset();
267+
stopwatch.Reset();
268268
stopwatch.Start();
269269

270270
// if user has set maxFiles param, loop only that many files
@@ -1292,6 +1292,9 @@ void ImportArgs(string rawArgs)
12921292
case "offset":
12931293
chkAutoOffset.IsChecked = value.ToLower() == "true";
12941294
break;
1295+
case "offsetmode":
1296+
txtOffsetMode.Text = value;
1297+
break;
12951298
case "rgb":
12961299
chkImportRGB.IsChecked = value.ToLower() == "true";
12971300
break;
@@ -1368,6 +1371,23 @@ void ImportArgs(string rawArgs)
13681371
case "customintensityrange":
13691372
chkCustomIntensityRange.IsChecked = value.ToLower() == "true";
13701373
break;
1374+
case "detectintensityrange":
1375+
chkDetectIntensityRange.IsChecked = value.ToLower() == "true";
1376+
break;
1377+
case "filter":
1378+
chkUseFilter.IsChecked = true;
1379+
txtFilterDistance.Text = value;
1380+
break;
1381+
case "srgb":
1382+
chkConvertSRGB.IsChecked = value.ToLower() == "true";
1383+
break;
1384+
case "usegrid":
1385+
chkUseGrid.IsChecked = value.ToLower() == "true";
1386+
break;
1387+
case "threadmemgb":
1388+
chkUseMemoryLimit.IsChecked = true;
1389+
txtMemoryLimit.Text = value;
1390+
break;
13711391
default:
13721392
Console.WriteLine($"Unknown argument: {key}");
13731393
break;

Writers/PCROOT.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
// PCROOT (v3) Exporter https://github.com/unitycoder/UnityPointCloudViewer/wiki/Binary-File-Format-Structure#custom-v3-tiles-pcroot-and-pct-rgb
2-
// Low-RAM bucketed implementation:
3-
// - AddPoint() spills each point into one of N bucket files (sequential writes).
4-
// - Save() reads buckets back one by one, accumulates tiles up to a memory budget, flushes to final pct/rgb/int/cla.
5-
// - Preserves: packColors, importIntensity, importClassification, averageTimestamp, minimumPointCount, randomize (chunk shuffle).
6-
// Notes:
7-
// - useLossyFiltering is not supported in this bucketed path (kept false).
8-
// - randomize is done per flushed chunk (not a perfect whole-tile Fisher-Yates unless a tile fits in memory).
92

103
using PointCloudConverter.Logger;
114
using System;
@@ -583,6 +576,7 @@ void IWriter.Cleanup(int fileIndex)
583576
tileStats.Clear();
584577
}
585578

579+
586580
public void SetIntensityRange(bool isCustomRange)
587581
{
588582
importSettings.useCustomIntensityRange = isCustomRange;
@@ -701,8 +695,6 @@ private int BucketIdForKey(int x, int y, int z)
701695
return h & (BucketCount - 1);
702696
}
703697

704-
705-
706698
private void FlushTileBuffers(
707699
Dictionary<(int x, int y, int z), TileBuffer> buffers,
708700
string baseFolder, string fileOnly, int fileIndex,
@@ -726,7 +718,6 @@ private void FlushTileBuffers(
726718
}
727719
}
728720

729-
730721
private sealed class TileBuffer
731722
{
732723
private readonly ImportSettings s;

0 commit comments

Comments
 (0)