Skip to content
Snippets Groups Projects
Commit 701a0dea authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

STYLE: remove tab

parent 666f1a68
No related branches found
No related tags found
No related merge requests found
...@@ -171,7 +171,7 @@ ImageFileReader<TOutputImage> ...@@ -171,7 +171,7 @@ ImageFileReader<TOutputImage>
// Adapte the image size with the region // Adapte the image size with the region
std::streamoff nbBytes = (this->m_ImageIO->GetComponentSize() * this->m_ImageIO->GetNumberOfComponents()) std::streamoff nbBytes = (this->m_ImageIO->GetComponentSize() * this->m_ImageIO->GetNumberOfComponents())
* static_cast<std::streamoff>(region.GetNumberOfPixels()); * static_cast<std::streamoff>(region.GetNumberOfPixels());
char * loadBuffer = new char[nbBytes]; char * loadBuffer = new char[nbBytes];
...@@ -344,7 +344,8 @@ ImageFileReader<TOutputImage> ...@@ -344,7 +344,8 @@ ImageFileReader<TOutputImage>
But in the case TSX, the images tif were considered as ossimQuickbirdTiffTileSource But in the case TSX, the images tif were considered as ossimQuickbirdTiffTileSource
thus a TSX tif image wasn't read with TSX Model. We don't use the ossimRegisteryFactory thus a TSX tif image wasn't read with TSX Model. We don't use the ossimRegisteryFactory
because the default include factory contains ossimQuickbirdTiffTileSource. */ because the default include factory contains ossimQuickbirdTiffTileSource. */
ossimProjection * projection = ossimplugins::ossimPluginProjectionFactory::instance()->createProjection(ossimFilename(lFileNameOssimKeywordlist.c_str()), 0); ossimProjection * projection = ossimplugins::ossimPluginProjectionFactory::instance()
->createProjection(ossimFilename(lFileNameOssimKeywordlist.c_str()), 0);
if (!projection) if (!projection)
{ {
...@@ -365,7 +366,8 @@ ImageFileReader<TOutputImage> ...@@ -365,7 +366,8 @@ ImageFileReader<TOutputImage>
ossimImageHandlerRegistry::instance()->addFactory(ossimImageHandlerSarFactory::instance()); ossimImageHandlerRegistry::instance()->addFactory(ossimImageHandlerSarFactory::instance());
ossimImageHandler* handler = ossimImageHandlerRegistry::instance()->open(ossimFilename(lFileNameOssimKeywordlist.c_str())); ossimImageHandler* handler = ossimImageHandlerRegistry::instance()
->open(ossimFilename(lFileNameOssimKeywordlist.c_str()));
if (!handler) if (!handler)
{ {
otbMsgDevMacro( <<"OSSIM Open Image FAILED ! "); otbMsgDevMacro( <<"OSSIM Open Image FAILED ! ");
......
...@@ -40,17 +40,17 @@ namespace otb ...@@ -40,17 +40,17 @@ namespace otb
template <class TInputImage, class TOutputImage> template <class TInputImage, class TOutputImage>
TerraSarCalibrationImageFilter<TInputImage,TOutputImage> TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
::TerraSarCalibrationImageFilter() : m_CalibrationFactor(itk::NumericTraits<double>::Zero), ::TerraSarCalibrationImageFilter() : m_CalibrationFactor(itk::NumericTraits<double>::Zero),
m_PRF(1.), m_PRF(1.),
m_OriginalProductSize(), m_OriginalProductSize(),
m_UseFastCalibration(false), m_UseFastCalibration(false),
m_ResultsInDecibels(false), m_ResultsInDecibels(false),
m_NoiseRecords(), m_NoiseRecords(),
m_DefaultValue(0.00001), m_DefaultValue(0.00001),
m_IncidenceAngleRecords(), m_IncidenceAngleRecords(),
m_IncidenceAngleAx(0.), m_IncidenceAngleAx(0.),
m_IncidenceAngleAy(0.), m_IncidenceAngleAy(0.),
m_IncidenceAngleOffset(0.), m_IncidenceAngleOffset(0.),
m_ParametersUpToDate(false) m_ParametersUpToDate(false)
{} {}
template <class TInputImage, class TOutputImage> template <class TInputImage, class TOutputImage>
...@@ -225,7 +225,8 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage> ...@@ -225,7 +225,8 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
// Retrieve corners incidence angle // Retrieve corners incidence angle
std::vector<double> cangles = lImageMetadata->GetCornersIncidenceAngles(this->GetInput()->GetMetaDataDictionary()); std::vector<double> cangles = lImageMetadata->GetCornersIncidenceAngles(this->GetInput()->GetMetaDataDictionary());
std::vector<IndexType> cindex = lImageMetadata->GetCornersIncidenceAnglesIndex(this->GetInput()->GetMetaDataDictionary()); std::vector<IndexType> cindex = lImageMetadata->GetCornersIncidenceAnglesIndex(
this->GetInput()->GetMetaDataDictionary());
std::vector<double>::const_iterator angIt = cangles.begin(); std::vector<double>::const_iterator angIt = cangles.begin();
typename std::vector<IndexType>::const_iterator indIt = cindex.begin(); typename std::vector<IndexType>::const_iterator indIt = cindex.begin();
...@@ -283,8 +284,8 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage> ...@@ -283,8 +284,8 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
++aIt; ++aIt;
} }
// Set the offset to the mean angle // Set the offset to the mean angle
m_IncidenceAngleOffset/=m_IncidenceAngleRecords.size(); m_IncidenceAngleOffset /= m_IncidenceAngleRecords.size();
m_IncidenceAngleOffset*= M_PI / 180.; m_IncidenceAngleOffset *= M_PI / 180.;
return; return;
} }
...@@ -296,7 +297,8 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage> ...@@ -296,7 +297,8 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
// Fill the linear system // Fill the linear system
for(unsigned int i = 0; i < nbRecords; ++i) for(unsigned int i = 0; i < nbRecords; ++i)
{ {
std::cout<<"Incidence record: "<<m_IncidenceAngleRecords.at(i).first<<" <-> "<<m_IncidenceAngleRecords.at(i).second<<std::endl; std::cout<<"Incidence record: "<<m_IncidenceAngleRecords.at(i).first<<" <-> "
<<m_IncidenceAngleRecords.at(i).second<<std::endl;
a(i,0) = m_IncidenceAngleRecords.at(i).first[0]; a(i,0) = m_IncidenceAngleRecords.at(i).first[0];
a(i,1) = m_IncidenceAngleRecords.at(i).first[1]; a(i,1) = m_IncidenceAngleRecords.at(i).first[1];
a(i,2) = 1.; a(i,2) = 1.;
...@@ -420,7 +422,8 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage> ...@@ -420,7 +422,8 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
} }
} }
// Apply the calibration functor // Apply the calibration functor
outputIt.Set( calibrationFunctor( inputIt.Get(), inputIt.GetIndex(), this->ComputeIncidenceAngle(inputIt.GetIndex()) ) ); outputIt.Set( calibrationFunctor( inputIt.Get(), inputIt.GetIndex(),
this->ComputeIncidenceAngle(inputIt.GetIndex()) ) );
++inputIt; ++inputIt;
++outputIt; ++outputIt;
progress.CompletedPixel(); // potential exception thrown here progress.CompletedPixel(); // potential exception thrown here
...@@ -436,16 +439,17 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage> ...@@ -436,16 +439,17 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
Superclass::PrintSelf(os, indent); Superclass::PrintSelf(os, indent);
os << indent << "Calibration Factor: " << m_CalibrationFactor << std::endl; os << indent << "Calibration Factor: " << m_CalibrationFactor << std::endl;
os << indent << "PRF: "<<m_PRF <<std::endl; os << indent << "PRF: " << m_PRF << std::endl;
os << indent << "Original product size: "<<m_OriginalProductSize << std::endl; os << indent << "Original product size: " << m_OriginalProductSize << std::endl;
os << indent << "Fast calibration: " << (m_UseFastCalibration ? "On" : "Off")<<std::endl; os << indent << "Fast calibration: " << (m_UseFastCalibration ? "On" : "Off") << std::endl;
os << indent << "Results in decibels: " << (m_ResultsInDecibels ? "Yes" : "No") << std::endl; os << indent << "Results in decibels: " << (m_ResultsInDecibels ? "Yes" : "No") << std::endl;
os << indent << "Number of noise records: " << m_NoiseRecords.size() <<std::endl; os << indent << "Number of noise records: " << m_NoiseRecords.size() <<std::endl;
os << indent << "Number of angle records: " << m_IncidenceAngleRecords.size() << std::endl; os << indent << "Number of angle records: " << m_IncidenceAngleRecords.size() << std::endl;
os << indent << "Angle regression: "<<m_IncidenceAngleAx<<"* col + "<<m_IncidenceAngleAx<<" * row +"<<m_IncidenceAngleOffset<<std::endl; os << indent << "Angle regression: " << m_IncidenceAngleAx
<<"* col + "<<m_IncidenceAngleAx
<<" * row +"<<m_IncidenceAngleOffset<<std::endl;
} }
} // namespace otb } // namespace otb
#endif #endif
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