From 3950563348bb68babc498d552cba6ebbe4ee077a Mon Sep 17 00:00:00 2001 From: Melanie <melanie.carriere@kitware.com> Date: Wed, 18 Nov 2020 10:50:29 +0100 Subject: [PATCH] [api] Add a boolean parameter to be able to have the sensor information concisely The status bar of LidarView is the lower part of Lidarview. This contains : - The pcap filename - Information about the sensor displayed in Lidarview - The paraview progress bar - The application logo The pcap filename was cropped if it was too long (longer than 43 characters). This is too short from the clients point of view. 'GetSensorInformation' was called to display the sensor information part. For some sensor, this can be very long. By shorting this part we can allow more space to the pcap name. --- LidarPlugin/IO/Lidar/Common/vtkLidarPacketInterpreter.h | 3 ++- LidarPlugin/IO/Lidar/Common/vtkLidarReader.cxx | 4 ++-- LidarPlugin/IO/Lidar/Common/vtkLidarReader.h | 3 ++- LidarPlugin/IO/Lidar/Common/vtkLidarStream.cxx | 4 ++-- LidarPlugin/IO/Lidar/Common/vtkLidarStream.h | 3 ++- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/LidarPlugin/IO/Lidar/Common/vtkLidarPacketInterpreter.h b/LidarPlugin/IO/Lidar/Common/vtkLidarPacketInterpreter.h index 08b0739ad..4aa5bb4f4 100644 --- a/LidarPlugin/IO/Lidar/Common/vtkLidarPacketInterpreter.h +++ b/LidarPlugin/IO/Lidar/Common/vtkLidarPacketInterpreter.h @@ -112,9 +112,10 @@ public: /** * @brief GetSensorInformation return information to display to the user + * @param shortVersion True to have a succinct version of the sensor information * @return */ - virtual std::string GetSensorInformation() = 0; + virtual std::string GetSensorInformation(bool shortVersion = false) = 0; /** * @brief CreateNewFrameInformation create a new frame information diff --git a/LidarPlugin/IO/Lidar/Common/vtkLidarReader.cxx b/LidarPlugin/IO/Lidar/Common/vtkLidarReader.cxx index bf156eaf5..18e98a427 100644 --- a/LidarPlugin/IO/Lidar/Common/vtkLidarReader.cxx +++ b/LidarPlugin/IO/Lidar/Common/vtkLidarReader.cxx @@ -35,9 +35,9 @@ int vtkLidarReader::FillOutputPortInformation(int port, vtkInformation* info) } //----------------------------------------------------------------------------- -std::string vtkLidarReader::GetSensorInformation() +std::string vtkLidarReader::GetSensorInformation(bool shortVersion) { - return this->Interpreter->GetSensorInformation(); + return this->Interpreter->GetSensorInformation(shortVersion); } //----------------------------------------------------------------------------- diff --git a/LidarPlugin/IO/Lidar/Common/vtkLidarReader.h b/LidarPlugin/IO/Lidar/Common/vtkLidarReader.h index c681164d2..c545b5470 100644 --- a/LidarPlugin/IO/Lidar/Common/vtkLidarReader.h +++ b/LidarPlugin/IO/Lidar/Common/vtkLidarReader.h @@ -44,8 +44,9 @@ public: /** * @brief GetSensorInformation return some sensor information used for display purposes + * @param shortVersion True to have a succinct version of the sensor information */ - virtual std::string GetSensorInformation(); + virtual std::string GetSensorInformation(bool shortVersion = false); /** * @copydoc vtkLidarPacketInterpreter::CalibrationFileName diff --git a/LidarPlugin/IO/Lidar/Common/vtkLidarStream.cxx b/LidarPlugin/IO/Lidar/Common/vtkLidarStream.cxx index b3b06c7ae..bdfa48242 100644 --- a/LidarPlugin/IO/Lidar/Common/vtkLidarStream.cxx +++ b/LidarPlugin/IO/Lidar/Common/vtkLidarStream.cxx @@ -43,9 +43,9 @@ int vtkLidarStream::FillOutputPortInformation(int port, vtkInformation* info) } //----------------------------------------------------------------------------- -std::string vtkLidarStream::GetSensorInformation() +std::string vtkLidarStream::GetSensorInformation(bool shortVersion) { - return this->GetLidarInterpreter()->GetSensorInformation(); + return this->GetLidarInterpreter()->GetSensorInformation(shortVersion); } //----------------------------------------------------------------------------- diff --git a/LidarPlugin/IO/Lidar/Common/vtkLidarStream.h b/LidarPlugin/IO/Lidar/Common/vtkLidarStream.h index 12109903a..ee20c09b0 100644 --- a/LidarPlugin/IO/Lidar/Common/vtkLidarStream.h +++ b/LidarPlugin/IO/Lidar/Common/vtkLidarStream.h @@ -30,8 +30,9 @@ public: /** * @brief GetSensorInformation return some sensor information used for display purposes + * @param shortVersion True to have a succinct version of the sensor information */ - virtual std::string GetSensorInformation(); + virtual std::string GetSensorInformation(bool shortVersion = false); /** * @copydoc vtkLidarPacketInterpreter::CalibrationFileName -- GitLab