Skip to content
Snippets Groups Projects
Verified Commit 04bf09ac authored by tristan.muller's avatar tristan.muller Committed by philippe.verley_ird.fr
Browse files

Fix the NaN values in the filters.

parent 3dc4d424
No related branches found
No related tags found
No related merge requests found
......@@ -30,9 +30,6 @@ import fr.amap.commons.util.swing.jprogress.JProgressFrame;
import fr.amap.lidar.amapvox.visualization.views.VisualizationScene;
import java.io.InputStream;
import fr.amap.lidar.amapvox.visualization.views.MainView;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.UnsupportedLookAndFeelException;
import net.jcip.annotations.ThreadSafe;
/**
......
......@@ -72,7 +72,6 @@ public class JXVoxelFilter extends FrameView {
private JXComboBox filteringComboBox;
private JCheckBox filteringNaNCheckBox;
private JXPanel valuePanel;
private JXLabel valueLabel;
private JSlider valueSlider;
private JXTextField valueTextField;
......@@ -204,8 +203,8 @@ public class JXVoxelFilter extends FrameView {
final ExecutorService executor = Executors.newCachedThreadPool();
executor.execute(() -> {
final String property = (String) propertyComboBox.getSelectedItem();
valueTextField.setText(Float.toString(
voxelFile.getSingleProperty(property, valueSlider.getValue())));
final float v = voxelFile.getSingleProperty(property, valueSlider.getValue());
valueTextField.setText(Float.toString(v));
});
executor.shutdown();
......
......@@ -130,7 +130,7 @@ public class VoxelSpaceFile extends JProgressable {
for (List<Float> line : lines) {
final float v = line.get(names.indexOf(property));
if (v != Float.NaN) {
if (!Float.isNaN(v)) {
if (!sortedValues.contains(v)) {
sortedValues.add(v);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment