unable to adjust property of .ntf file (NITF 2.1) on qt SDK.

132
2
04-20-2021 06:37 AM
TASL_Virendra
New Contributor

Hi 

We are trying to load .ntf file on ArcGIS as raster image but we are not able to control the property of the image. Image is getting loaded as like raw image.

the source code is: 

if (dataPath.contains("file:/"))
dataPath = QString(QUrl(dataPath).toLocalFile());


//! [RasterLayerFile cpp new raster layer]
Raster* raster = new Raster(dataPath, this);
RasterLayer* rasterLayer = new RasterLayer(raster, this);
//! [RasterLayerFile cpp new raster layer]

connect(rasterLayer, &RasterLayer::doneLoading, this, [this, rasterLayer](Error loadError)
{
if (!loadError.isEmpty())
{
qDebug()<<"!loadError.isEmpty()";

return;
}

m_mapView->setViewpointCenter(rasterLayer->fullExtent().center(), 80000);
});

rasterLayer->setGamma(100.0);


m_map->operationalLayers()->clear();

m_map->operationalLayers()->append(rasterLayer);

 

The gamma also functionality is not making any diff , please see the attached image.

Spot_Raster.PNG

 

0 Kudos
2 Replies
JamesBallard1
Esri Contributor

Hi @TASL_Virendra .

Thanks for reaching out to the Runtime team. I can reproduce this problem and I will log it internally for us to investigate.

In the meantime, it does work for me if I change the gamma value after the raster loads. Can you try that and see if it works for you?

In your code it would be putting the "rasterLayer->setGamma(100.0);" call into the doneLoading lambda.

0 Kudos
JamesBallard1
Esri Contributor

@TASL_Virendra ,

I hope the workaround was successful for you. We have fixed this bug in the next release of Runtime, 100.12. This will be out before the end of 2021.

0 Kudos