Loading isis/src/qisis/objs/Image/Image.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ #include <geos/io/WKTWriter.h> #include "Angle.h" #include "Camera.h" #include "Cube.h" #include "CubeAttribute.h" #include "DisplayProperties.h" Loading Loading @@ -57,6 +58,7 @@ namespace Isis { m_serialNumber = SerialNumber::Compose(*(cube())); cube(); m_cameraType = m_cube->camera()->GetCameraType(); initCamStats(); Loading Loading @@ -91,6 +93,7 @@ namespace Isis { m_lineResolution = Null; m_sampleResolution = Null; m_cameraType = m_cube->camera()->GetCameraType(); m_observationNumber = ObservationNumber::Compose(*(cube())); m_serialNumber = SerialNumber::Compose(*(cube())); Loading Loading @@ -288,6 +291,16 @@ namespace Isis { } /** * @brief Get the camera type for this Image. * * @return Camera::CameraType Returns the camera type for this Image. */ Camera::CameraType Image::cameraType() const { return m_cameraType; } /** * @brief Get the display (GUI) properties (information) associated with this image. * @return @b (ImageDisplayProperties *) Returns a poniter to an ImageDisplayProperties Loading isis/src/qisis/objs/Image/Image.h +28 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <QString> #include "Angle.h" #include "Camera.h" #include "Distance.h" #include "FileName.h" #include "XmlStackedHandler.h" Loading Loading @@ -99,6 +100,22 @@ namespace Isis { * after the first call to these methods are O(1) and are not * bottlenecekd by any file I/O that occurs in the Compose() * methods. References #497. * @history 2018-07-11 Ian Humphrey - Constructor now stores the CameraType of the cube, * accessible via Image::cameraType(). The two previous changes * regarding observationNumber() and serialNumber() do speed up * access regarding Compose() (see above history entries). * JigsawSetupDialog's constructor uses the Image::cube() to get the * camera type (via camera()->GetCameraType()) in order to create * default observation solve settings. This was slow because the image * importer (ImportImagesWorkOrder::importConfirmedImages()) is closing * the imported Image's cube once it is successfully imported (when * the QFuture is ready). So, the JigsawSetupDialog was having to * load cubes into memory upon its first construction (when you first * click the "Setup" button in the JigsawRunWidget). The newly added * Image::cameraType() allows a way to get O(1) access to the type * without having the cube in memory. In brief, the JigsawSetupDialog * should not have to wait to have all of it's Images's cubes loaded * into memory before it shows up. Refences #497. */ class Image : public QObject { Loading @@ -115,6 +132,7 @@ namespace Isis { bool isFootprintable() const; Cube *cube(); void closeCube(); Camera::CameraType cameraType() const; ImageDisplayProperties *displayProperties(); const ImageDisplayProperties *displayProperties() const; QString fileName() const; Loading Loading @@ -193,6 +211,16 @@ namespace Isis { calculated by the NaifBodyCode() method.*/ // QString *m_name; //!< Name of the target /** * Stores the camera type of the Image. * * This allows O(1) querying for the camera type whether * or not the Image's Cube is loaded into memory. Before, if the Cube was not loaded into * memory and you want to know the cameraType via cube()->camera()->GetCameraType(), it would * have to construct the Cube to get this information. JigsawSetupDialog needs quick access * during its construction to create default observation solve settings based on camera type. */ Camera::CameraType m_cameraType; /** * The cube associated with this Image. This is usually NULL once the image is done Loading Loading
isis/src/qisis/objs/Image/Image.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ #include <geos/io/WKTWriter.h> #include "Angle.h" #include "Camera.h" #include "Cube.h" #include "CubeAttribute.h" #include "DisplayProperties.h" Loading Loading @@ -57,6 +58,7 @@ namespace Isis { m_serialNumber = SerialNumber::Compose(*(cube())); cube(); m_cameraType = m_cube->camera()->GetCameraType(); initCamStats(); Loading Loading @@ -91,6 +93,7 @@ namespace Isis { m_lineResolution = Null; m_sampleResolution = Null; m_cameraType = m_cube->camera()->GetCameraType(); m_observationNumber = ObservationNumber::Compose(*(cube())); m_serialNumber = SerialNumber::Compose(*(cube())); Loading Loading @@ -288,6 +291,16 @@ namespace Isis { } /** * @brief Get the camera type for this Image. * * @return Camera::CameraType Returns the camera type for this Image. */ Camera::CameraType Image::cameraType() const { return m_cameraType; } /** * @brief Get the display (GUI) properties (information) associated with this image. * @return @b (ImageDisplayProperties *) Returns a poniter to an ImageDisplayProperties Loading
isis/src/qisis/objs/Image/Image.h +28 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <QString> #include "Angle.h" #include "Camera.h" #include "Distance.h" #include "FileName.h" #include "XmlStackedHandler.h" Loading Loading @@ -99,6 +100,22 @@ namespace Isis { * after the first call to these methods are O(1) and are not * bottlenecekd by any file I/O that occurs in the Compose() * methods. References #497. * @history 2018-07-11 Ian Humphrey - Constructor now stores the CameraType of the cube, * accessible via Image::cameraType(). The two previous changes * regarding observationNumber() and serialNumber() do speed up * access regarding Compose() (see above history entries). * JigsawSetupDialog's constructor uses the Image::cube() to get the * camera type (via camera()->GetCameraType()) in order to create * default observation solve settings. This was slow because the image * importer (ImportImagesWorkOrder::importConfirmedImages()) is closing * the imported Image's cube once it is successfully imported (when * the QFuture is ready). So, the JigsawSetupDialog was having to * load cubes into memory upon its first construction (when you first * click the "Setup" button in the JigsawRunWidget). The newly added * Image::cameraType() allows a way to get O(1) access to the type * without having the cube in memory. In brief, the JigsawSetupDialog * should not have to wait to have all of it's Images's cubes loaded * into memory before it shows up. Refences #497. */ class Image : public QObject { Loading @@ -115,6 +132,7 @@ namespace Isis { bool isFootprintable() const; Cube *cube(); void closeCube(); Camera::CameraType cameraType() const; ImageDisplayProperties *displayProperties(); const ImageDisplayProperties *displayProperties() const; QString fileName() const; Loading Loading @@ -193,6 +211,16 @@ namespace Isis { calculated by the NaifBodyCode() method.*/ // QString *m_name; //!< Name of the target /** * Stores the camera type of the Image. * * This allows O(1) querying for the camera type whether * or not the Image's Cube is loaded into memory. Before, if the Cube was not loaded into * memory and you want to know the cameraType via cube()->camera()->GetCameraType(), it would * have to construct the Cube to get this information. JigsawSetupDialog needs quick access * during its construction to create default observation solve settings based on camera type. */ Camera::CameraType m_cameraType; /** * The cube associated with this Image. This is usually NULL once the image is done Loading