Commit 99d23339 authored by Julien Osman's avatar Julien Osman
Browse files

BUG: Add sensor model comparison to GlImageActor

parent f85fc319
Pipeline #8831 passed with stages
in 24 minutes and 59 seconds
......@@ -723,9 +723,6 @@ void GlImageActor::ImageRegionToViewportExtent(const RegionType& region, double
void GlImageActor::ImageRegionToViewportQuad(const RegionType & region, PointType & ul, PointType & ur, PointType & ll, PointType & lr, bool rotate) const
{
// Retrieve settings
ViewSettings::ConstPointer settings = this->GetSettings();
itk::ContinuousIndex<double,2> cul,cur,cll,clr;
cul[0] = region.GetIndex()[0];
......@@ -780,9 +777,6 @@ void GlImageActor::ImageRegionToViewportQuad(const RegionType & region, PointTyp
void GlImageActor::ViewportExtentToImageRegion(const double& ulx, const double & uly, const double & lrx, const double & lry, RegionType & region) const
{
// Retrieve settings
ViewSettings::ConstPointer settings = this->GetSettings();
RegionType largest = m_FileReader->GetOutput()->GetLargestPossibleRegion();
PointType ul,ur,ll,lr,tul,tur,tll,tlr;
......@@ -1092,12 +1086,15 @@ void GlImageActor::UpdateTransforms()
// << std::hex << this << std::dec
// << " WKT-changed: " << isEqualOrNot << std::endl;
//TODO OSSIM: Replace KeywordList by ImageMetadata in the settings object
geometryChanged = geometryChanged
|| (m_ViewportToImageTransform.IsNotNull() && m_ViewportToImageTransform->GetInputProjectionRef() != settings->GetWkt())
|| (m_ImageToViewportTransform.IsNotNull() && m_ImageToViewportTransform->GetOutputProjectionRef() != settings->GetWkt())
|| (m_ViewportToImageTransform.IsNotNull() /*&& !(m_ViewportToImageTransform->GetInputKeywordList() == settings->GetKeywordList())*/)
|| (m_ImageToViewportTransform.IsNotNull() /*&& !(m_ImageToViewportTransform->GetOutputKeywordList() == settings->GetKeywordList())*/);
|| (m_ViewportToImageTransform.IsNotNull() && m_ViewportToImageTransform->GetInputImageMetadata() == nullptr)
|| (m_ImageToViewportTransform.IsNotNull() && m_ImageToViewportTransform->GetInputImageMetadata() == nullptr)
|| (m_ViewportToImageTransform.IsNotNull() && !HasSameSensorModel(*(m_ViewportToImageTransform->GetInputImageMetadata()),
*(settings->GetImageMetadata())))
|| (m_ImageToViewportTransform.IsNotNull() && !HasSameSensorModel(*(m_ImageToViewportTransform->GetInputImageMetadata()),
*(settings->GetImageMetadata())));
if(settings->GetUseProjection() && geometryChanged)
{
......
......@@ -34,6 +34,7 @@ ViewSettings::ViewSettings() :
m_Spacing.Fill( 1 );
m_ViewportSize.Fill( 0 );
m_RotationCenter.Fill( 0 );
m_ImageMetadata = nullptr;
}
ViewSettings::~ViewSettings()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment