OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimSingleImageChain.cpp
Go to the documentation of this file.
1 //---
2 //
3 // License: MIT
4 //
5 // Author: David Burken
6 //
7 // Description: Utility class definition for a single image chain.
8 //
9 //---
10 // $Id$
11 
13 
16 #include <ossim/base/ossimNotify.h>
19 // #include <ossim/imaging/ossimTiledImagePatch.h>
21 
23  :
25  m_handler(0),
26  m_bandSelector(0),
27  m_histogramRemapper(0),
28  m_brightnessContrast(0),
29  m_sharpen(0),
30  m_scalarRemapper(0),
31  m_resamplerCache(0),
32  m_resampler(0),
33  m_chainCache(0),
34  m_addNullPixelFlipFlag(false),
35  m_addHistogramFlag(false),
36  m_addResamplerCacheFlag(false),
37  m_addChainCacheFlag(false),
38  m_remapToEightBitFlag(false),
39  m_threeBandFlag(false),
40  m_threeBandReverseFlag(false),
41  m_brightnessContrastFlag(false),
42  m_sharpenFlag(false),
43  m_geoPolyCutterFlag(false)
44 {
45 }
46 
48  bool addHistogramFlag,
49  bool addResamplerCacheFlag,
50  bool addChainCacheFlag,
51  bool remapToEightBitFlag,
52  bool threeBandFlag,
53  bool threeBandReverseFlag,
54  bool brightnessContrastFlag,
55  bool sharpenFlag,
56  bool geoPolyCutterFlag)
57  :
59  m_handler(0),
60  m_bandSelector(0),
61  m_histogramRemapper(0),
62  m_brightnessContrast(0),
63  m_sharpen(0),
64  m_scalarRemapper(0),
65  m_resamplerCache(0),
66  m_resampler(0),
67  m_chainCache(0),
68  m_addNullPixelFlipFlag(addNullPixelFlipFlag),
69  m_addHistogramFlag(addHistogramFlag),
70  m_addResamplerCacheFlag(addResamplerCacheFlag),
71  m_addChainCacheFlag(addChainCacheFlag),
72  m_remapToEightBitFlag(remapToEightBitFlag),
73  m_threeBandFlag(threeBandFlag),
74  m_threeBandReverseFlag(threeBandReverseFlag),
75  m_brightnessContrastFlag(brightnessContrastFlag),
76  m_sharpenFlag(sharpenFlag),
77  m_geoPolyCutterFlag(geoPolyCutterFlag)
78 {
79 }
80 
82 {
83  m_handler = 0;
84  m_nullPixelFlip = 0;
85  m_bandSelector = 0;
88  m_sharpen = 0;
89  m_scalarRemapper = 0;
90  m_resamplerCache = 0;
91  m_resampler = 0;
92  m_chainCache = 0;
93  m_geoPolyCutter = 0;
94 
95 }
96 
98 {
99  bool result = true;
100  do
101  {
102  result = deleteLast();
103  } while (result);
104 
105  m_handler = 0;
106  m_bandSelector = 0;
107  m_nullPixelFlip = 0;
110  m_sharpen = 0;
111  m_scalarRemapper = 0;
112  m_resamplerCache = 0;
113  m_resampler = 0;
114  m_geoPolyCutter = 0;
115  m_chainCache = 0;
116 
117  m_addHistogramFlag = false;
118  m_addNullPixelFlipFlag = false;
119  m_addResamplerCacheFlag = false;
120  m_addChainCacheFlag = false;
121  m_remapToEightBitFlag = false;
122  m_threeBandFlag = false;
123  m_threeBandReverseFlag = false;
124  m_brightnessContrastFlag = false;
125  m_sharpenFlag = false;
126  m_geoPolyCutterFlag = false;
127 }
128 
130 {
131  if ( m_handler.valid() )
132  {
133  if ( removeChild(m_handler.get()) )
134  {
135  m_handler = 0;
136  }
137  }
138 }
139 
141 {
142  ossimFilename result;
143  if ( m_handler.valid() )
144  {
145  result = m_handler->getFilename();
146  }
147  return result;
148 }
149 
150 bool ossimSingleImageChain::open(const ossimFilename& file, bool openOverview)
151 {
152  return addImageHandler(file, openOverview);
153 }
154 
156 {
157  return m_handler.valid();
158 }
159 
161 {
162  return addImageHandler(src);
163 }
164 
166 {
167  // Band selector after image handler only if needed.
168  if ( m_handler.valid() )
169  {
170  // Only add if multiple bands.
171  if ( m_handler->getNumberOfOutputBands() != 1 )
172  {
173  addBandSelector();
175  {
177  }
178  }
179  }
180  else // No image handler so just add it.
181  {
182  addBandSelector();
183  }
184 
185  // will do this here. Not sure if we want flipped just before the resampler or if we want to do it here.
186  // I think this is a better place for you can now manipulate the flipped pixel
188  {
190  }
191 
192  // histogram:
193  if ( m_addHistogramFlag )
194  {
196  }
197 
198  // brightness contrast:
200  {
202  }
203 
204  // sharpen filter:
205  if ( m_sharpenFlag )
206  {
207  addSharpen();
208  }
209 
210  // scalar remapper
211  if ( m_remapToEightBitFlag )
212  {
213  if ( m_handler.valid() )
214  {
215  // See if it's eight bit.
217  {
219  }
220  }
221  else
222  {
223  // Just add...
225  }
226  }
227 
228  // resampler cache
230  {
232 
233  // If input image is tiled set the cache input tile size to that.
234  if ( m_handler.valid() )
235  {
236  if ( m_handler->isImageTiled() )
237  {
238  ossimIpt inputImageTileSize;
239  inputImageTileSize.x = (ossim_int32)m_handler->getImageTileWidth();
240  inputImageTileSize.y = (ossim_int32)m_handler->getImageTileHeight();
241  if ( m_resamplerCache.valid() )
242  {
243  m_resamplerCache->setTileSize( inputImageTileSize );
244  }
245  }
246  }
247  }
248 
249 #if 0 /* test code - drb */
251  if ( m_handler.valid() )
252  {
253  if ( m_handler->isImageTiled() )
254  {
255  ossimIpt inputImageTileSize;
256  inputImageTileSize.x = (ossim_int32)m_handler->getImageTileWidth();
257  inputImageTileSize.y = (ossim_int32)m_handler->getImageTileHeight();
258  tp->setInputTileSize( inputImageTileSize );
259  }
260  }
261  addFirst( tp.get() );
262 #endif
263 
264  // resampler
265  addResampler();
266 
267 #if 0 /* test code - drb */
269  ossimIpt inputImageTileSize(64, 64);
270  tp2->setInputTileSize( inputImageTileSize );
271  addFirst( tp2.get() );
272 #endif
273 
274  //---
275  // Do this here so that if a band selector is added to the end of the
276  // chain it will go in before the end of chain cache.
277  //---
278  if (m_threeBandFlag)
279  {
280  if (!m_bandSelector)
281  {
282  addBandSelector();
283  }
284  setToThreeBands();
285  }
286 
287  //---
288  // Ditto...
289  //---
291  {
292  addBandSelector();
294  }
295 
296  // Put the geo cutter just before the cache.
298  {
300  }
301 
302  // End of chain cache.
303  if ( m_addChainCacheFlag )
304  {
306  }
307 
308  initialize();
309 
310 }
311 
313 {
314  // Band selector after image handler only if needed.
315  if ( m_handler.valid() )
316  {
317  // Only add if needed.
318  if ( ( m_handler->getNumberOfOutputBands() != 1 ) || src.getBands().size() )
319  {
320  addBandSelector(src);
322  {
324  }
325  }
326  }
327  else // No image handler so just add it.
328  {
329  addBandSelector(src);
330  }
331 
333  {
335  }
336  // histogram
337  if ( m_addHistogramFlag || src.getHistogramOp().size() )
338  {
340  }
341 
342  // brightness contrast:
344  {
346  }
347 
348  // sharpen filter:
349  if ( m_sharpenFlag )
350  {
351  addSharpen();
352  }
353 
354  // scalar remapper
355  if ( m_remapToEightBitFlag )
356  {
357  if ( m_handler.valid() )
358  {
359  // See if it's eight bit.
361  {
363  }
364  }
365  else
366  {
367  // Just add...
369  }
370  }
371 
372  // resampler cache
374  {
376  }
377 
378  // resampler
379  addResampler();
380 
381  //---
382  // Do this here so that if a band selector is added to the end of the
383  // chain it will go in before the end of chain cache.
384  //---
385  if (m_threeBandFlag)
386  {
387  if (!m_bandSelector) // Input must be one band.
388  {
389  addBandSelector(src);
390  }
391  setToThreeBands();
392  }
393 
394  //---
395  // Ditto...
396  //---
398  {
399  addBandSelector();
401  }
402 
403  // End of chain cache.
404  if ( m_addChainCacheFlag )
405  {
407  }
408 
409  initialize();
410 
411 }
412 
413 bool ossimSingleImageChain::addImageHandler(const ossimFilename& file, bool openOverview)
414 {
415  bool result = false;
416 
417  close();
418 
419  // m_handler = ossimImageHandlerRegistry::instance()->open(file, true, openOverview);
421 
422  if ( m_handler.valid() )
423  {
424  // Add to the chain. Note: last is really first.
425  addLast( m_handler.get() );
426 
427  result = true;
428  }
429 
430  return result;
431 }
432 
434 {
435  bool result = false;
436 
437  close();
438 
439  // m_handler = ossimImageHandlerRegistry::instance()->open(file, true, openOverview);
441 
442  if ( m_handler.valid() )
443  {
444  // Add to the chain. Note: last is really first.
445  addLast( m_handler.get() );
446 
447  result = true;
448  }
449 
450  return result;
451 
452 // bool result = addImageHandler( src.getFilename() );
453 #if 0
454  if (result)
455  {
456  //---
457  // When loading from ossimSrcRecord typically the overview/histograms are
458  // not in the same directory and the "support" keyword is not set. For
459  // the ossimImageHandler::getFilenameWithThisExtension to work correctly
460  // the ossimImageHandler::theSupplementaryDirectory must be set.
461  // So if the ossimSrcRecord::getSupportDir() is empty and the overview
462  // or histogram is not co-located with the image we will set it here.
463  //---
464  ossimFilename supportDir = src.getSupportDir();
465  if ( supportDir.empty() )
466  {
467  if ( src.getOverviewPath().size() )
468  {
469  if ( src.getOverviewPath().isDir() )
470  {
471  supportDir = src.getOverviewPath();
472  }
473  else
474  {
475  supportDir = src.getOverviewPath().path();
476  }
477  }
478  else if ( src.getHistogramPath().size() )
479  {
480  if ( src.getHistogramPath().isDir() )
481  {
482  supportDir = src.getHistogramPath();
483  }
484  else
485  {
486  supportDir = src.getHistogramPath().path();
487  }
488  }
489  else if ( src.getMaskPath().size() )
490  {
491  if ( src.getMaskPath().isDir() )
492  {
493  supportDir = src.getMaskPath();
494  }
495  else
496  {
497  supportDir = src.getMaskPath().path();
498  }
499  }
500  }
501  if ( supportDir.size() && (src.getFilename().path() != supportDir) )
502  {
503  m_handler->setSupplementaryDirectory( supportDir );
504  }
505  if ( src.getEntryIndex() > 0 ) // defaulted to -1.
506  {
507  m_handler->setCurrentEntry( static_cast<ossim_uint32>( src.getEntryIndex() ) );
508  }
509  if ( m_handler->getOverview() == 0 )
510  {
511  if ( src.getOverviewPath().size() )
512  {
514  }
515  else
516  {
518  m_handler->openOverview( ovrFile );
519  }
520  }
521  }
522  #endif
523  return result;
524 }
525 
527 {
528  if (!m_bandSelector)
529  {
531 
532  // Add to the end of the chain.
534  }
535 }
536 
538 {
539  if (!m_bandSelector)
540  {
542 
543  // Add to the end of the chain.
545  }
546  if ( src.getBands().size() )
547  {
549  }
550 }
551 
553 {
554  if(!m_nullPixelFlip)
555  {
558  }
559 }
561 {
562  if(!m_nullPixelFlip)
563  {
566  }
567 }
568 
570 {
571  if (!m_histogramRemapper)
572  {
574 
576 
577  // Add to the end of the chain.
579  }
580 }
581 
583 {
584  static const char MODULE[] =
585  "ossimSingleImageChain::addHistogramRemapper(const ossimSrcRecord&)";
586 
587  if (!m_histogramRemapper)
588  {
590 
592 
593  // Add to the end of the chain.
595  }
596 
597  if ( src.getHistogramOp().size() && m_handler.valid() )
598  {
599  // Create histogram code here???
600 
601  // Open the histogram if needed.
603  {
604  ossimFilename f;
605  if ( src.getSupportDir().size() )
606  {
607  f = src.getSupportDir();
609  f.setExtension(".his");
610  }
611  else
612  {
614  }
615  if ( m_histogramRemapper->openHistogram( f ) == false )
616  {
618  << MODULE << "\nCould not open: " << f << "\n";
619  }
620  }
621 
622  // Set the histogram strech mode.
623  if ( src.getHistogramOp().size() )
624  {
625  // Enable.
627 
628  // Set the histo mode:
629  ossimString op = src.getHistogramOp();
630  op.downcase();
631  if ( op == "auto-minmax" )
632  {
634  }
635  else if ( (op == "std-stretch-1") || (op == "std-stretch 1") )
636  {
638  }
639  else if ( (op == "std-stretch-2") || (op == "std-stretch 2") )
640  {
642  }
643  else if ( (op == "std-stretch-3") || (op == "std-stretch 3") )
644  {
646  }
647  else
648  {
651  << MODULE << "\nUnhandled operation: " << op << "\n";
652  }
653  }
654 
655  } // End: if ( src.setHistogramOp().size() && m_handler.valid() )
656 }
657 
659 {
661 
662  // Add to the end of the chain.
663  addFirst(cache.get());
664 
665  return cache;
666 }
667 
669 {
670  if ( !m_resampler )
671  {
673 
674  // Add to the end of the chain.
676  }
677 }
679 {
680  addResampler();
681 }
682 
684 {
685  if ( !m_scalarRemapper )
686  {
688 
689  if ( m_resamplerCache.valid() )
690  {
691  // Add to the left of the resampler cache.
693  }
694  else
695  {
696  // Add to the end of the chain.
698  }
699  }
700 }
701 
703 {
704  if ( !m_brightnessContrast )
705  {
707 
708  // Add to the end of the chain.
710  }
711 }
712 
714 {
715  if ( !m_sharpen )
716  {
718 
719  // Add to the end of the chain.
720  addFirst( m_sharpen.get() );
721  }
722 }
723 
725 {
726  if(!m_geoPolyCutter.valid())
727  {
729 
730  //---
731  // ossimGeoPolyCutter requires a view geometry to transform the points.
732  // So set prior to adding to end of chain if valid. If not, user is
733  // responsible for setting.
734  //---
736  if ( geom.valid() )
737  {
738  m_geoPolyCutter->setView( geom.get() );
739  }
740 
742  }
743 }
744 
745 void ossimSingleImageChain::addGeoPolyCutterPolygon(const vector<ossimGpt>& polygon)
746 {
747  if(!m_geoPolyCutter.valid())
748  {
750  }
751 
752  // sanity check to verify that the add did not fail
753  if(m_geoPolyCutter.valid())
754  {
755  m_geoPolyCutter->addPolygon(polygon);
756  }
757 }
758 
760 {
761  if(!m_geoPolyCutter.valid())
762  {
764  }
765 
766  // sanity check to verify that the add did not fail
767  if(m_geoPolyCutter.valid())
768  {
769  m_geoPolyCutter->addPolygon(polygon);
770  }
771 }
772 
774 {
776 }
777 
779 {
780  return m_handler;
781 }
782 
784 {
786 }
787 
789 {
791 }
792 
793 
795 {
796  return m_bandSelector;
797 }
798 
800 {
802 }
803 
805 {
806  return m_histogramRemapper;
807 }
808 
810 {
812 }
813 
815 {
816  return m_resamplerCache;
817 }
818 
820 {
822 }
823 
825 {
826  return m_resampler;
827 }
828 
830 {
832 }
833 
835 {
836  return m_scalarRemapper;
837 }
838 
841 {
843 }
844 
846 {
847  return m_brightnessContrast;
848 }
849 
852 {
854 }
855 
857 {
858  return m_sharpen;
859 }
860 
862 {
864 }
865 
867 {
868  return m_chainCache;
869 }
870 
871 
873 {
874  m_addNullPixelFlipFlag = true;
875 }
876 
878 {
879  return m_addNullPixelFlipFlag;
880 }
881 
883 {
884  m_addHistogramFlag = flag;
885 }
886 
888 {
889  return m_addHistogramFlag;
890 }
891 
893 {
895 }
896 
898 {
900 }
901 
903 {
904  m_addChainCacheFlag = flag;
905 }
906 
908 {
909  return m_addChainCacheFlag;
910 }
911 
913 {
914  m_remapToEightBitFlag = flag;
915 }
916 
918 {
919  return m_remapToEightBitFlag;
920 }
921 
923 {
924  m_threeBandFlag = flag;
925 }
926 
928 {
929  return m_threeBandFlag;
930 }
931 
933 {
934  m_threeBandReverseFlag = flag;
935 }
936 
938 {
939  return m_threeBandReverseFlag;
940 }
941 
943 {
945 }
946 
948 {
950 }
951 
953 {
954  m_sharpenFlag = flag;
955 }
956 
958 {
959  return m_sharpenFlag;
960 }
961 
963 {
964  if (!m_bandSelector)
965  {
966  addBandSelector();
967  }
968 
971 
972  if ( m_histogramRemapper.valid() )
973  {
975  }
976 
977 #if 0
978  if ( m_handler.valid() )
979  {
980  // Only do if not three bands already so the band list order is not wiped out.
981  if ( !m_bandSelector.valid() ||
982  ( m_bandSelector.valid() &&
983  ( m_bandSelector->getNumberOfOutputBands() != 3 ) ) )
984  {
985  std::vector<ossim_uint32> bandList(3);
986 
987  if ( m_handler->getRgbBandList( bandList ) == false )
988  {
990  if(BANDS >= 3)
991  {
992  bandList[0] = 0;
993  bandList[1] = 1;
994  bandList[2] = 2;
995  }
996  else
997  {
998  bandList[0] = 0;
999  bandList[1] = 0;
1000  bandList[2] = 0;
1001  }
1002  }
1003  setBandSelection(bandList);
1004  }
1005  }
1006 #endif
1007 }
1008 
1010 {
1011  if ( m_handler.valid() )
1012  {
1013  std::vector<ossim_uint32> bandList(3);
1014  const ossim_uint32 BANDS = m_handler->getNumberOfInputBands();
1015  if(BANDS >= 3)
1016  {
1017  bandList[0] = 2;
1018  bandList[1] = 1;
1019  bandList[2] = 0;
1020  }
1021  else
1022  {
1023  bandList[0] = 0;
1024  bandList[1] = 0;
1025  bandList[2] = 0;
1026  }
1027  setBandSelection(bandList);
1028  }
1029 }
1030 
1032  const std::vector<ossim_uint32>& bandList)
1033 {
1034  if (!m_bandSelector)
1035  {
1036  addBandSelector();
1037  }
1039  m_bandSelector->setOutputBandList(bandList);
1040  if ( m_histogramRemapper.valid() )
1041  {
1043  }
1044 }
1045 
1047 {
1048  if(!m_bandSelector)
1049  {
1050  addBandSelector();
1051  }
1053 
1054  if(m_bandSelector.valid())
1055  {
1057  }
1058 }
1059 
1061 {
1063  if ( m_handler.valid() )
1064  {
1065  result = m_handler->getOutputScalarType();
1066  }
1067  return result;
1068 }
1069 
1071 {
1072  bool result = false;
1074  if ( ih.valid() )
1075  {
1077  if ( hr.valid() )
1078  {
1080  if ( hr->openHistogram( f ) == true )
1081  {
1082  // Enable:
1083  hr->setEnableFlag(true);
1084 
1085  // Set the mode:
1086  hr->setStretchMode( mode );
1087 
1088  result = true;
1089  }
1090  }
1091  }
1092  return result;
1093 }
ossimRefPtr< ossimImageSharpenFilter > m_sharpen
Class used for parsing the command line *.src files.
virtual bool removeChild(ossimConnectableObject *object)
Will remove the child from the container.
ossim_int32 getEntryIndex() const
void setToThreeBands()
Utility method to force 3 band output.
void addBandSelector()
Adds a band selector to the end of the chain.
void setAddResamplerCacheFlag(bool flag)
If flag is true a resampler cache will be added to the chain at create time.
ossimRefPtr< ossimCacheTileSource > m_chainCache
ossimRefPtr< ossimNullPixelFlip > m_nullPixelFlip
void addNullPixelFlip()
Adds the null pixel flip just after the band selection.
void setAddNullPixelFlipFlag(bool flag)
If flag is true a null pixel flip will be added to the chain at create time.
bool addLast(ossimConnectableObject *obj)
Adds it to the end.
bool getThreeBandFlag() const
Get the three band flag.
bool deleteLast()
Deletes the last object.
static const ossimFilename NIL
This was taken from Wx widgets for performing touch and access date stamps.
Definition: ossimFilename.h:40
virtual ossimImageHandler * open(const ossimFilename &fileName, bool trySuffixFirst=true, bool openOverview=true) const
open that takes a filename.
ossimRefPtr< const ossimImageSharpenFilter > getSharpenFilter() const
void setToThreeBandsReverse()
Utility method to set to 3 bandsand reverse them.
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if not defined...
ossimRefPtr< const ossimImageHandler > getImageHandler() const
void addResampler()
Adds a resampler (a.k.a.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
ossimRefPtr< ossimBrightnessContrastSource > m_brightnessContrast
ossimRefPtr< ossimGeoPolyCutter > m_geoPolyCutter
bool valid() const
Definition: ossimRefPtr.h:75
void setSharpenFlag(bool flag)
Sets the sharpenflag.
const ossimFilename & getMaskPath() const
ossimFilename getHistogramFile() const
Returns the currently opened histogram.
ossimFilename getFilename() const
virtual void initialize()
void createRenderedChain()
Create a rendered image chain.
virtual const ossimImageHandler * getOverview() const
void addSharpen()
Adds sharpen filter the end of the chain if not present.
void addGeoPolyCutter()
Adds a geo polycutter to allow for cropping imagery or nulling out regions.
Class to fill a patch from input tiles requested on even tile boundaries with a tile size typically m...
ossimRefPtr< ossimImageHandler > m_handler
Pointers to links in chain.
ossimRefPtr< ossimImageHandler > openConnection(const ossimString &connectionString, bool openOverview=true) const
const std::vector< ossim_uint32 > & getBands() const
virtual ~ossimSingleImageChain()
virtual destructor
bool isDir() const
const ossimFilename & getSupportDir() const
ossimRefPtr< ossimScalarRemapper > m_scalarRemapper
void setBrightnessContrastFlag(bool flag)
Sets the brightness contrast flag.
virtual bool openOverview()
Searches for an overview.
ossimScalarType getImageHandlerScalarType() const
Convenience method to return the scalar type of the image handler.
void setBandSelection(const std::vector< ossim_uint32 > &bandList)
method to set band selector.
const ossimFilename & getOverviewPath() const
See note below on these data members.
ossimRefPtr< const ossimCacheTileSource > getChainCache() const
const ossimFilename & getFilename() const
void setStretchMode(StretchMode mode, bool rebuildTableFlag=false)
Sets remap mode to mode.
bool getNullPixelFlipFlag() const
Gets the add histogram flag.
const ossimKeywordlist & getAttributesKwl() const
Returns the KWL containing the desired vector representation properties.
ossimRefPtr< const ossimScalarRemapper > getScalarRemapper() const
bool getThreeBandReverseFlag() const
Get the three band reverse flag.
ossimRefPtr< ossimHistogramRemapper > m_histogramRemapper
virtual bool setView(ossimObject *baseObject)
virtual const ossimFilename & getFilename() const
Returns the filename.
bool getAddChainCacheFlag() const
Gets the add chain cache flag.
ossimSingleImageChain()
default constructor
void addRenderer()
Adds a resampler (a.k.a.
std::string::size_type size() const
Definition: ossimString.h:405
void reset()
reset method This deletes all links in the chain, zero&#39;s out all data members, and sets all flags bac...
ossimRefPtr< ossimImageRenderer > m_resampler
virtual ossim_uint32 getImageTileHeight() const =0
Returns the tile width of the image or 0 if the image is not tiled.
bool getSharpenFlag() const
Get the sharpen flag.
void addBrightnessContrast()
Adds brightness contrast filter the end of the chain if not present.
unsigned int ossim_uint32
void setThreeBandReverseFlag(bool flag)
Sets the three band reverse flag.
Cache Tile Source.
void setTileSize(const ossimIpt &size)
Set the tile size.
virtual bool getRgbBandList(std::vector< ossim_uint32 > &bandList) const
Convenience method to get the zero based rgb output band list.
void addScalarRemapper()
Adds scalar remapper either to the left of the resampler cache or at the end of the chain if not pres...
bool m_addNullPixelFlipFlag
control flags
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
bool getBrightnessContrastFlag() const
Get the brightness constrast flag.
virtual void addPolygon(const vector< ossimIpt > &polygon)
ossimRefPtr< ossimCacheTileSource > addCache()
Adds a new cache to the current end of the chain.
bool openHistogram(ossimHistogramRemapper::StretchMode mode)
Convenience method to open the histogram and apply a default stretch.
bool getAddResamplerCacheFlag() const
Gets the add resampler cache flag.
virtual void setEnableFlag(bool flag)
Definition: ossimSource.cpp:99
const ossimFilename & getHistogramPath() const
ossimScalarType
ossimRefPtr< const ossimHistogramRemapper > getHistogramRemapper() const
void setAddHistogramFlag(bool flag)
If flag is true a histogram will be added to the chain at create time.
ossimRefPtr< ossimBandSelector > m_bandSelector
virtual ossim_uint32 getImageTileWidth() const =0
Returns the tile width of the image or 0 if the image is not tiled.
ossimRefPtr< const ossimNullPixelFlip > getNullPixelFlip() const
virtual bool isImageTiled() const
Indicates whether or not the image is tiled internally.
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
bool getRemapToEightBitFlag() const
Get the remap to eight bit flag.
void addHistogramRemapper()
Adds histogram remapper to the chain.
ossim_int32 y
Definition: ossimIpt.h:142
bool addImageHandler(const ossimFilename &file, bool openOverview=true)
Adds an image handler for file.
ossimFilename fileNoExtension() const
virtual void setThreeBandRgb()
Will set to three bands (rgb) out.
virtual void setOutputBandList(const vector< ossim_uint32 > &outputBandList, bool disablePassThru=false)
Sets the output band list.
ossimFilename dirCat(const ossimFilename &file) const
void setRemapToEightBitFlag(bool flag)
Sets remap to eigth bit flag.
bool open(const ossimFilename &file, bool openOverview=true)
open method that takes an image file.
ossimRefPtr< const ossimCacheTileSource > getResamplerCache() const
bool empty() const
Definition: ossimString.h:411
virtual void setSupplementaryDirectory(const ossimFilename &dir)
Sets the supplementary directory.
static ossimImageHandlerRegistry * instance()
bool getAddHistogramFlag() const
Gets the add histogram flag.
ossimRefPtr< const ossimBandSelector > getBandSelector() const
ossim_int32 x
Definition: ossimIpt.h:141
ossimRefPtr< const ossimImageRenderer > getImageRenderer() const
8 bit unsigned integer
bool setInputTileSize(const ossimIpt &tileSize)
Sets the input tile size.
virtual ossim_uint32 getNumberOfInputBands() const =0
ossimFilename & setExtension(const ossimString &e)
Sets the extension of a file name.
virtual bool setCurrentEntry(ossim_uint32 entryIdx)
const ossimString & getHistogramOp() const
ossimFilename getFilenameWithThisExtension(const ossimString &ext, bool set_e0_prefix=false) const
Returns the image file with extension set using supplentary directory for dirname if set...
bool insertLeft(ossimConnectableObject *newObj, const ossimId &id)
ossimFilename path() const
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
void setThreeBandFlag(bool flag)
Sets the three band flag.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
bool openHistogram(const ossimFilename &histogram_file)
Open the histogram file.
void addGeoPolyCutterPolygon(const vector< ossimGpt > &polygon)
bool addFirst(ossimConnectableObject *obj)
Adds it to the start of the chain.
ossimRefPtr< const ossimBrightnessContrastSource > getBrightnessContrast() const
int ossim_int32
void close()
close method to delete the image handler.
void setAddChainCacheFlag(bool flag)
If flag is true a chain cache will be added to the chain at create time.
ossimRefPtr< ossimCacheTileSource > m_resamplerCache