diff --git a/CMakeLists.txt b/CMakeLists.txt index 44210973cd9efced1537e8da70544ca3f4bd1917..258794d301be72b835941ee389c258c7c5a4dd99 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ SET(CMAKE_MODULE_PATH INCLUDE_REGULAR_EXPRESSION("^(otb|itk|vtk|vnl|vcl|vxl|f2c|netlib|ce|itpack|DICOM|meta|png|dbh|tif|jpeg|zlib).*$") SOURCE_GROUP("XML Files" REGULAR_EXPRESSION "[.]xml$") +INCLUDE(CMakeDependentOption) # On Visual Studio 8 MS deprecated C. This removes all 1.276E1265 security # warnings @@ -286,13 +287,18 @@ IF(OTB_USE_VISU_GUI) #------------------------------- # FLTK Library #------------------------------- - OPTION(OTB_USE_EXTERNAL_FLTK "Use an outside build of FLTK." OFF) + + #OPTION(OTB_USE_EXTERNAL_FLTK "Use an outside build of FLTK." OFF) + FIND_PACKAGE(FLTK) - IF(FLTK_FOUND) - SET(OTB_USE_EXTERNAL_FLTK ON) - ELSE(FLTK_FOUND) - SET(OTB_USE_EXTERNAL_FLTK OFF) - ENDIF(FLTK_FOUND) + CMAKE_DEPENDENT_OPTION(OTB_USE_EXTERNAL_FLTK "Use an outside build of FLTK." ON + "FLTK_FOUND" OFF) + +# IF(FLTK_FOUND) +# SET(OTB_USE_EXTERNAL_FLTK ON) +# ELSE(FLTK_FOUND) +# SET(OTB_USE_EXTERNAL_FLTK OFF) +# ENDIF(FLTK_FOUND) # Option for internal/external FLTK MARK_AS_ADVANCED(OTB_USE_EXTERNAL_FLTK) @@ -610,23 +616,26 @@ ENDIF(OTB_USE_EXTERNAL_GDAL) #Experimental FIND_PACKAGE(Gettext) IF(GETTEXT_FOUND) - SET(OTB_I18N 1) - SET(OTB_LANG $ENV{LANG} CACHE STRING "OTB internationalization (Experimental)")#might want to get the Locale from the system here - SET(OTB_LANG_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/I18n) - SUBDIRS(I18n) - FIND_PATH(GETTEXT_INCLUDE_DIR - libintl.h - DOC "Path to gettext include directory (where libintl.h can be found)") - MARK_AS_ADVANCED(GETTEXT_INCLUDE_DIR) - - IF(GETTEXT_INCLUDE_DIR) - INCLUDE_DIRECTORIES(${GETTEXT_INCLUDE_DIR}) - ENDIF(GETTEXT_INCLUDE_DIR) - FIND_LIBRARY(GETTEXT_LIBRARY gettextlib DOC "GetText library") IF(APPLE OR WIN32) FIND_LIBRARY(GETTEXT_INTL_LIBRARY intl DOC "GetText intl library") ENDIF(APPLE OR WIN32) + + IF(GETTEXT_LIBRARY) + SET(OTB_I18N 1) + SET(OTB_LANG $ENV{LANG} CACHE STRING "OTB internationalization (Experimental)")#might want to get the Locale from the system here + SET(OTB_LANG_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/I18n) + ADD_SUBDIRECTORY(I18n) + FIND_PATH(GETTEXT_INCLUDE_DIR + libintl.h + DOC "Path to gettext include directory (where libintl.h can be found)") + MARK_AS_ADVANCED(GETTEXT_INCLUDE_DIR) + + IF(GETTEXT_INCLUDE_DIR) + INCLUDE_DIRECTORIES(${GETTEXT_INCLUDE_DIR}) + ENDIF(GETTEXT_INCLUDE_DIR) + ENDIF(GETTEXT_LIBRARY) + ELSE(GETTEXT_FOUND) SET(OTB_I18N 0) MESSAGE(STATUS diff --git a/Code/Common/CMakeLists.txt b/Code/Common/CMakeLists.txt index f13715fa4a9f6bc717b05168f108f73ffea8a5b1..7f516a7943a45c6104a5ee113d9c591a350442f6 100644 --- a/Code/Common/CMakeLists.txt +++ b/Code/Common/CMakeLists.txt @@ -22,12 +22,12 @@ IF(OTB_USE_PQXX) TARGET_LINK_LIBRARIES(OTBCommon pq pqxx) ENDIF(OTB_USE_PQXX) -IF(GETTEXT_FOUND) +IF(OTB_I18N) TARGET_LINK_LIBRARIES(OTBCommon ${GETTEXT_LIBRARY}) IF(APPLE OR WIN32) TARGET_LINK_LIBRARIES(OTBCommon ${GETTEXT_INTL_LIBRARY}) ENDIF(APPLE OR WIN32) -ENDIF(GETTEXT_FOUND) +ENDIF(OTB_I18N) IF(OTB_LIBRARY_PROPERTIES) SET_TARGET_PROPERTIES(OTBCommon PROPERTIES ${OTB_LIBRARY_PROPERTIES}) diff --git a/Code/Common/otbConfigurationFile.cxx b/Code/Common/otbConfigurationFile.cxx index 086ce45a56fa8ca06c21916e5437c69925ea9474..e71e17d9784510b1984dbbd835d8826eac8e3f3b 100644 --- a/Code/Common/otbConfigurationFile.cxx +++ b/Code/Common/otbConfigurationFile.cxx @@ -16,6 +16,7 @@ =========================================================================*/ #include "otbConfigurationFile.h" +#include "otbMacro.h" namespace otb { @@ -25,6 +26,8 @@ ConfigurationFile::Pointer ConfigurationFile::Instance = NULL; ConfigurationFile ::ConfigurationFile() { + m_OTBConfig = NULL; + std::string OTBBinDir(OTB_CONFIG); try { @@ -32,7 +35,7 @@ ConfigurationFile } catch (ConfigFile::file_not_found& e) { - itkExceptionMacro(<< "Error - File '" << e.filename << "' not found."); + otbMsgDebugMacro(<< "Error - File '" << e.filename << "' not found."); } } diff --git a/Code/Common/otbConfigurationFile.h b/Code/Common/otbConfigurationFile.h index 7572a2b0ff5fda45ea74b593df5ebc58a54b669d..616b747a81bfb6433f6cbe4bf6069a345466c41b 100644 --- a/Code/Common/otbConfigurationFile.h +++ b/Code/Common/otbConfigurationFile.h @@ -57,7 +57,13 @@ namespace otb /** Get parameter*/ template<typename T> T GetParameter(const std::string & key) const { - try + + if(m_OTBConfig == NULL) + { + itkExceptionMacro(<<"Configuration file not found."); + } + + try { return m_OTBConfig->read<T>( key ); } diff --git a/Code/Common/otbObjectListToObjectListFilter.h b/Code/Common/otbObjectListToObjectListFilter.h index 35cfe3ffef30cf767583151f782f5440304bab89..3a760cd43130ff8fef85b6e0c151b4d7d646d7a8 100644 --- a/Code/Common/otbObjectListToObjectListFilter.h +++ b/Code/Common/otbObjectListToObjectListFilter.h @@ -42,10 +42,10 @@ class ITK_EXPORT ObjectListToObjectListFilter : public otb::ObjectListSource<TOu { public: /** Standard class typedefs. */ - typedef ObjectListToObjectListFilter Self; + typedef ObjectListToObjectListFilter Self; typedef otb::ObjectListSource<TOutputList> Superclass; - typedef itk::SmartPointer<Self> Pointer; - typedef itk::SmartPointer<const Self> ConstPointer; + typedef itk::SmartPointer<Self> Pointer; + typedef itk::SmartPointer<const Self> ConstPointer; /** Method for creation through the object factory. */ itkNewMacro(Self); @@ -54,22 +54,19 @@ public: itkTypeMacro(ObjectListToObjectListFilter, ObjectListSource); /** Some typedefs. */ - typedef TInputList InputListType; - typedef TOutputList OutputListType; - typedef typename TInputList::ConstPointer InputListPointer; - typedef typename TOutputList::Pointer OutputListPointer; - typedef typename TInputList::ConstIterator InputListIterator; - typedef typename InputListType::ObjectType InputObjectType; + typedef TInputList InputListType; + typedef TOutputList OutputListType; + typedef typename TInputList::ConstPointer InputListPointer; + typedef typename TOutputList::Pointer OutputListPointer; + typedef typename TInputList::ConstIterator InputListIterator; + typedef typename InputListType::ObjectType InputObjectType; typedef typename OutputListType::ObjectType OutputObjectType; - typedef itk::DataObject::Pointer DataObjectPointer; - - typedef std::vector<OutputListPointer> OutputListForThreadType; + typedef itk::DataObject::Pointer DataObjectPointer; virtual void SetInput( const InputListType *input); const InputListType * GetInput(void); - protected: /** Constructor */ ObjectListToObjectListFilter(); @@ -82,11 +79,14 @@ protected: /** Multi-threading implementation */ + typedef std::vector<OutputListPointer> OutputListForThreadType; + virtual void BeforeThreadedGenerateData(); virtual void AfterThreadedGenerateData() {}; - virtual int SplitRequestedRegion(int threadId, int threadCount, unsigned int requestedElements, unsigned int& startIndex, unsigned int& stopIndex); + virtual int SplitRequestedRegion(int threadId, int threadCount, unsigned int requestedElements, + unsigned int& startIndex, unsigned int& stopIndex); /** startIndex and stopIndex represent the indices of the Objects * to examine in thread threadId */ diff --git a/Code/Common/otbStreamingTraits.txx b/Code/Common/otbStreamingTraits.txx index a698ef0c2667563f3e6253aece9791d8900c09c5..f0dff8a8c6ff52b8a36be9524a7b0ec5b3cc087b 100644 --- a/Code/Common/otbStreamingTraits.txx +++ b/Code/Common/otbStreamingTraits.txx @@ -114,7 +114,6 @@ unsigned long StreamingTraits<TImage> { typedef otb::ConfigurationFile ConfigurationType; ConfigurationType::Pointer conf = ConfigurationType::GetInstance(); - std::string lang = conf->GetParameter<std::string>("OTB_LANG"); std::streamoff streamMaxSizeBufferForStreamingBytes; std::streamoff streamImageSizeToActivateStreamingBytes; try diff --git a/Code/IO/otbImageFileReader.h b/Code/IO/otbImageFileReader.h index 2190767b976b62f8427f35af7099bbf8e3e0dd74..3496bd58dea12023e046569229bc98768ba07bad 100644 --- a/Code/IO/otbImageFileReader.h +++ b/Code/IO/otbImageFileReader.h @@ -24,7 +24,7 @@ namespace otb { /** \class ImageFileReader - * \brief Ressource to read an image from a file. + * \brief Resource to read an image from a file. * * \sa ImageSeriesReader * \sa ImageIOBase @@ -37,9 +37,9 @@ class ITK_EXPORT ImageFileReader : public itk::ImageFileReader<TOutputImage> { public: /** Standard class typedefs. */ - typedef ImageFileReader Self; + typedef ImageFileReader Self; typedef itk::ImageFileReader<TOutputImage> Superclass; - typedef itk::SmartPointer<Self> Pointer; + typedef itk::SmartPointer<Self> Pointer; /** Method for creation through the object factory. */ itkNewMacro(Self); @@ -59,8 +59,7 @@ public: /** The pixel type of the output image. */ //typedef typename TOutputImage::InternalPixelType OutputImagePixelType; - /** Prepare l'allocation de l'image output lors du premier appel de traitement - * pipeline. */ + /** Prepare image allocation at the first call of the pipeline processing */ virtual void GenerateOutputInformation(void); /** Does the real work. */ diff --git a/Code/IO/otbImageFileReader.txx b/Code/IO/otbImageFileReader.txx index 3974bdc9a22987de917943188bbbd07b2706e491..4522919442f1bba29f11af1e4562324ecee0aad6 100644 --- a/Code/IO/otbImageFileReader.txx +++ b/Code/IO/otbImageFileReader.txx @@ -170,7 +170,8 @@ ImageFileReader<TOutputImage> ImageRegionType region = output->GetBufferedRegion(); // Adapte the image size with the region - std::streamoff nbBytes = (this->m_ImageIO->GetImageSizeInBytes() / this->m_ImageIO->GetImageSizeInPixels()) * static_cast<std::streamoff>(region.GetNumberOfPixels()); + std::streamoff nbBytes = (this->m_ImageIO->GetImageSizeInBytes() / this->m_ImageIO->GetImageSizeInPixels()) + * static_cast<std::streamoff>(region.GetNumberOfPixels()); char * loadBuffer = new char[nbBytes]; @@ -339,12 +340,10 @@ ImageFileReader<TOutputImage> ossimKeywordlist geom_kwl, tmp_kwl, tmp_kwl2;// = new ossimKeywordlist(); - // Add the radar factory ossimImageHandlerRegistry::instance()->addFactory(ossimImageHandlerSarFactory::instance()); - ossimImageHandler* handler = ossimImageHandlerRegistry::instance() ->open(ossimFilename(lFileNameOssimKeywordlist.c_str())); @@ -371,14 +370,14 @@ ImageFileReader<TOutputImage> // Add the plugins factory ossimProjectionFactoryRegistry::instance()->registerFactory(ossimplugins::ossimPluginProjectionFactory::instance()); ossimProjection * projection = ossimProjectionFactoryRegistry::instance() - ->createProjection(ossimFilename(lFileNameOssimKeywordlist.c_str()),0); + ->createProjection(ossimFilename(lFileNameOssimKeywordlist.c_str()), 0); if (!projection) { - otbMsgDevMacro( <<"OSSIM Instanciate projection FAILED ! "); + otbMsgDevMacro( <<"OSSIM Instantiate projection FAILED ! "); } else { - otbMsgDevMacro( <<"OSSIM Instanciate projection SUCCESS ! "); + otbMsgDevMacro( <<"OSSIM Instantiate projection SUCCESS ! "); hasMetaData = projection->saveState(geom_kwl); // Free memory delete projection; @@ -399,7 +398,7 @@ ImageFileReader<TOutputImage> ImageKeywordlist otb_kwl; otb_kwl.SetKeywordlist( geom_kwl ); - // Update itk MetaData Dictionnary + // Update itk MetaData Dictionary itk::MetaDataDictionary& dict = this->m_ImageIO->GetMetaDataDictionary(); @@ -453,7 +452,7 @@ ImageFileReader<TOutputImage> } // Test if the file can be open for reading access. - //Only if m_FileName speciy a filname (not a dirname) + //Only if m_FileName specify a filename (not a dirname) if ( System::IsAFileName( this->m_FileName ) == true ) { std::ifstream readTester; @@ -481,7 +480,7 @@ ImageFileReader<TOutputImage> { std::vector<std::string> listFileSearch; listFileSearch.push_back("DAT_01.001"); - listFileSearch.push_back("dat_01.001");// RADARSAT ou SAR_ERS2 + listFileSearch.push_back("dat_01.001");// RADARSAT or SAR_ERS2 listFileSearch.push_back("IMAGERY.TIF"); listFileSearch.push_back("imagery.tif");//For format SPOT5TIF // Not recognised as a supported file format by GDAL. diff --git a/Examples/IO/TileMapImageIOExample.cxx b/Examples/IO/TileMapImageIOExample.cxx index a7ea1f376185a95ba78b35ef5203eeb4f07e5405..e6bb490179137385ce381544a22ab892eb1ce93f 100644 --- a/Examples/IO/TileMapImageIOExample.cxx +++ b/Examples/IO/TileMapImageIOExample.cxx @@ -96,10 +96,10 @@ int main( int argc, char* argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::RGBPixel<unsigned char> RGBPixelType; - typedef otb::Image<RGBPixelType, 2> ImageType; + typedef itk::RGBPixel<unsigned char> RGBPixelType; + typedef otb::Image<RGBPixelType, 2> ImageType; typedef otb::ImageFileReader<ImageType> ReaderType; - typedef otb::TileMapImageIO ImageIOType; + typedef otb::TileMapImageIO ImageIOType; ImageIOType::Pointer tileIO = ImageIOType::New(); ReaderType::Pointer readerTile = ReaderType::New(); @@ -117,7 +117,7 @@ int main( int argc, char* argv[] ) // that's why we don't want to do an update before extracting a specific // area. // - // The coordinates are refered with an origin at the North Pole and the + // The coordinates are referred with an origin at the North Pole and the // change date meridian in Mercator projection. So we need to translate the latitude // and the longitude in this funny coordinate system: // diff --git a/Utilities/otbossim/include/ossim/imaging/ossimTileMapTileSource.h b/Utilities/otbossim/include/ossim/imaging/ossimTileMapTileSource.h index 2913cf54c046593e09fba5b65c1689c4b4b60b57..4ab83b1ca08b8a23d6256db75ea9e1b623971315 100644 --- a/Utilities/otbossim/include/ossim/imaging/ossimTileMapTileSource.h +++ b/Utilities/otbossim/include/ossim/imaging/ossimTileMapTileSource.h @@ -40,18 +40,6 @@ public: virtual bool open(); - virtual double getNullPixelValue(ossim_uint32 band=0)const; - - virtual double getMinPixelValue(ossim_uint32 band=0)const; - - virtual double getMaxPixelValue(ossim_uint32 band=0)const; - - virtual ossimScalarType getOutputScalarType() const; - - bool getAcquisitionDate(ossimDate& date)const; - ossimString getSatelliteName()const; - - ossimFilename getBandFilename(ossim_uint32 idx)const; //! Returns the image geometry object associated with this tile source or NULL if non defined. //! The geometry contains full-to-local image transform as well as projection (image-to-world) @@ -62,28 +50,12 @@ public: virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix = NULL); - /** - * @brief Gets a property for matching name. - * @param name The name of the property to get. - * @return Returns property matching "name". - */ - virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const; - - /** - * @brief Gets a list of property names available. - * @param propertyNames The list to push back names to. - */ - virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const; protected: virtual ~ossimTileMapTileSource(); private: - void openHeader(const ossimFilename& file); - - ossimRefPtr<ossimFfL7> theFfHdr; - TYPE_DATA }; diff --git a/Utilities/otbossim/include/ossim/projection/ossimTileMapModel.h b/Utilities/otbossim/include/ossim/projection/ossimTileMapModel.h index 068bd75709794baedfddc35ff883736d4e5fc275..a0d0b9daa2679407d2bacd7b797d39de2ddc9483 100644 --- a/Utilities/otbossim/include/ossim/projection/ossimTileMapModel.h +++ b/Utilities/otbossim/include/ossim/projection/ossimTileMapModel.h @@ -46,8 +46,6 @@ public: ossimTileMapModel(const ossimKeywordlist& geom_kwl); ossimTileMapModel(const ossimTileMapModel& rhs); - virtual ~ossimTileMapModel(); - enum ProjectionType { UNKNOWN_PROJECTION = 0, @@ -141,6 +139,8 @@ public: protected: + virtual ~ossimTileMapModel(); + /*! * Initializes the model given a fast format header. */ diff --git a/Utilities/otbossim/src/ossim/imaging/ossimTileMapTileSource.cpp b/Utilities/otbossim/src/ossim/imaging/ossimTileMapTileSource.cpp index 4399131a843117729d984e9a0ae8c8faddc2e4cb..ae938fef67196aae39f585925d640a64f9bf019d 100644 --- a/Utilities/otbossim/src/ossim/imaging/ossimTileMapTileSource.cpp +++ b/Utilities/otbossim/src/ossim/imaging/ossimTileMapTileSource.cpp @@ -16,8 +16,6 @@ #include <ossim/base/ossimTrace.h> #include <ossim/base/ossimNotifyContext.h> #include <ossim/base/ossimKeywordNames.h> -#include <ossim/support_data/ossimFfL7.h> -#include <ossim/support_data/ossimFfL5.h> #include <ossim/projection/ossimTileMapModel.h> RTTI_DEF1_INST(ossimTileMapTileSource, @@ -32,8 +30,7 @@ static ossimTrace traceDebug("ossimTileMapTileSource:debug"); //******************************************************************* ossimTileMapTileSource::ossimTileMapTileSource() : - ossimGeneralRasterTileSource(), - theFfHdr(NULL) + ossimGeneralRasterTileSource() { } @@ -43,8 +40,7 @@ ossimTileMapTileSource::ossimTileMapTileSource() ossimTileMapTileSource::ossimTileMapTileSource(const ossimKeywordlist& kwl, const char* prefix) : - ossimGeneralRasterTileSource(), - theFfHdr(NULL) + ossimGeneralRasterTileSource() { if (loadState(kwl, prefix) == false) { @@ -57,7 +53,7 @@ ossimTileMapTileSource::ossimTileMapTileSource(const ossimKeywordlist& kwl, //******************************************************************* ossimTileMapTileSource::~ossimTileMapTileSource() { - theFfHdr = NULL; +// theFfHdr = NULL; } bool ossimTileMapTileSource::open() @@ -76,36 +72,6 @@ bool ossimTileMapTileSource::open() return false; } -void ossimTileMapTileSource::openHeader(const ossimFilename& file) -{ - //*** - // TileMap file name example: l71024031_03119990929_hpn.fst - // Three header header file type substrings: - // HPN = Pan - // HRF = VNIR/SWIR (visible near infrared/shortwave infrared) - // HTM = Thermal - //*** - - ossimFilename hdr = file.file(); - hdr.downcase(); - if ( hdr.contains("hpn") || hdr.contains("hrf") || hdr.contains("htm") ) - { - theFfHdr = new ossimFfL7(file.c_str()); - } else if (hdr.contains("header.dat")) - { - theFfHdr = new ossimFfL5(file.c_str()); - } else { - theFfHdr = NULL; - return; - } - if (theFfHdr->getErrorStatus() != ossimErrorCodes::OSSIM_OK) - { - theFfHdr = 0; - } - return; - -} - ossimImageGeometry* ossimTileMapTileSource::getImageGeometry() { @@ -113,10 +79,10 @@ ossimImageGeometry* ossimTileMapTileSource::getImageGeometry() if (result->getProjection()) return theGeometry.get(); - if (!theFfHdr) return result; +// if (!theFfHdr) return result; // Make a model - ossimTileMapModel* model = new ossimTileMapModel (*theFfHdr); + ossimTileMapModel* model = new ossimTileMapModel (); if (model->getErrorStatus() != ossimErrorCodes::OSSIM_OK) return false; @@ -134,33 +100,6 @@ bool ossimTileMapTileSource::loadState(const ossimKeywordlist& kwl, } -ossimRefPtr<ossimProperty> ossimTileMapTileSource::getProperty( - const ossimString& name)const -{ - ossimRefPtr<ossimProperty> result = 0; - - if (theFfHdr.valid()) - { - result = theFfHdr->getProperty(name); - } - - if ( result.valid() == false ) - { - result = ossimGeneralRasterTileSource::getProperty(name); - } - - return result; -} - -void ossimTileMapTileSource::getPropertyNames( - std::vector<ossimString>& propertyNames)const -{ - if (theFfHdr.valid()) - { - theFfHdr->getPropertyNames(propertyNames); - } - ossimGeneralRasterTileSource::getPropertyNames(propertyNames); -} ossimString ossimTileMapTileSource::getShortName() const { @@ -177,76 +116,5 @@ ossimString ossimTileMapTileSource::className() const return ossimString("ossimTileMapTileSource"); } -double ossimTileMapTileSource::getNullPixelValue(ossim_uint32)const -{ - return 0.0; -} - -double ossimTileMapTileSource::getMinPixelValue(ossim_uint32)const -{ - return 1.0; -} - -double ossimTileMapTileSource::getMaxPixelValue(ossim_uint32)const -{ - return 255.0; -} - -ossimScalarType ossimTileMapTileSource::getOutputScalarType() const -{ - return OSSIM_UINT8; -} - -bool ossimTileMapTileSource::getAcquisitionDate(ossimDate& date)const -{ - if(!theFfHdr) return false; - - theFfHdr->getAcquisitionDate(date); - - return true; -} - -ossimString ossimTileMapTileSource::getSatelliteName()const -{ - if(!theFfHdr) return ""; - - return theFfHdr->getSatelliteName(); -} - -ossimFilename ossimTileMapTileSource::getBandFilename(ossim_uint32 idx)const -{ - ossim_uint32 maxIdx = getNumberOfInputBands(); - - if(!theFfHdr||(idx > maxIdx)) - { - return ""; - } - - ossimFilename path = getFilename().path(); - ossimString filename = theFfHdr->getBandFilename(idx); - filename = filename.trim(); - ossimFilename file = path.dirCat(filename); - - if (file.exists()) - { - return file; - } - - // Try downcased name. - file = path.dirCat(filename.downcase()); - if (file.exists()) - { - return file; - } - - // Try upcase name. - file = path.dirCat(filename.upcase()); - if (file.exists()) - { - return file; - } - - return ossimFilename(); -}