Skip to content

Commit

Permalink
Merge branch 'pixelfunctions-integration' into enhance-complex-datase…
Browse files Browse the repository at this point in the history
…ts-with-pf
  • Loading branch information
jmichel-otb committed Jul 6, 2016
2 parents a75faf5 + a53f540 commit dbd8187
Show file tree
Hide file tree
Showing 37 changed files with 2,558 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.c
*.pyc
*.o
*.so
*~
Binary file added autotest/gdrivers/data/cfloat64.tif
Binary file not shown.
Binary file added autotest/gdrivers/data/cint_sar.tif
Binary file not shown.
18 changes: 18 additions & 0 deletions autotest/gdrivers/data/pixfun_cmul_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="CFloat32" band="1" subClass="VRTDerivedRasterBand">
<Description>Product with complex conjugate</Description>
<PixelFunctionType>cmul</PixelFunctionType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
18 changes: 18 additions & 0 deletions autotest/gdrivers/data/pixfun_cmul_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float32" band="1" subClass="VRTDerivedRasterBand">
<Description>Product with complex conjugate</Description>
<PixelFunctionType>cmul</PixelFunctionType>
<SimpleSource>
<SourceFilename relativeToVRT="1">uint16.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">int32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
19 changes: 19 additions & 0 deletions autotest/gdrivers/data/pixfun_complex.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="CFloat32" band="1" subClass="VRTDerivedRasterBand">
<Description>Make complex</Description>
<PixelFunctionType>complex</PixelFunctionType>
<SourceTransferType>CFloat32</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">int32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">int32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_conj_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="CInt16" band="1" subClass="VRTDerivedRasterBand">
<Description>conjugate</Description>
<PixelFunctionType>conj</PixelFunctionType>
<SourceTransferType>CInt16</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_conj_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>conjugate</Description>
<PixelFunctionType>conj</PixelFunctionType>
<SourceTransferType>Int32</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">int32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_dB2amp.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>db to amplitude</Description>
<PixelFunctionType>dB2amp</PixelFunctionType>
<SourceTransferType>Float64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_dB2pow.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>dB to power</Description>
<PixelFunctionType>dB2pow</PixelFunctionType>
<SourceTransferType>Float64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
18 changes: 18 additions & 0 deletions autotest/gdrivers/data/pixfun_diff_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="CFloat32" band="1" subClass="VRTDerivedRasterBand">
<Description>Difference</Description>
<PixelFunctionType>diff</PixelFunctionType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">cfloat64.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
18 changes: 18 additions & 0 deletions autotest/gdrivers/data/pixfun_diff_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="Float32" band="1" subClass="VRTDerivedRasterBand">
<Description>Difference</Description>
<PixelFunctionType>diff</PixelFunctionType>
<SimpleSource>
<SourceFilename relativeToVRT="1">int32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="10" yOff="10" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_imag_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>Imaginary part</Description>
<PixelFunctionType>imag</PixelFunctionType>
<SourceTransferType>CFloat64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_imag_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float32" band="1" subClass="VRTDerivedRasterBand">
<Description>Imaginary part</Description>
<PixelFunctionType>imag</PixelFunctionType>
<SourceTransferType>Float32</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_intensity_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>Intensity</Description>
<PixelFunctionType>intensity</PixelFunctionType>
<SourceTransferType>CFloat64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_intensity_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float32" band="1" subClass="VRTDerivedRasterBand">
<Description>Intensity</Description>
<PixelFunctionType>intensity</PixelFunctionType>
<SourceTransferType>Float32</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_inv_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="CFloat64" band="1" subClass="VRTDerivedRasterBand">
<Description>Inverse</Description>
<PixelFunctionType>inv</PixelFunctionType>
<SourceTransferType>CFloat64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_inv_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>Inverse</Description>
<PixelFunctionType>inv</PixelFunctionType>
<SourceTransferType>Float64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_log10.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float32" band="1" subClass="VRTDerivedRasterBand">
<Description>Log10</Description>
<PixelFunctionType>log10</PixelFunctionType>
<SourceTransferType>Float32</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_mod_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="Float32" band="1" subClass="VRTDerivedRasterBand">
<Description>Magnitude</Description>
<PixelFunctionType>mod</PixelFunctionType>
<SourceTransferType>CFloat64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_mod_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="uint32" band="1" subClass="VRTDerivedRasterBand">
<Description>Magnitude</Description>
<PixelFunctionType>mod</PixelFunctionType>
<SourceTransferType>Int32</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">int32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
18 changes: 18 additions & 0 deletions autotest/gdrivers/data/pixfun_mul_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="CFloat32" band="1" subClass="VRTDerivedRasterBand">
<Description>Product</Description>
<PixelFunctionType>mul</PixelFunctionType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
24 changes: 24 additions & 0 deletions autotest/gdrivers/data/pixfun_mul_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float32" band="1" subClass="VRTDerivedRasterBand">
<Description>Product</Description>
<PixelFunctionType>mul</PixelFunctionType>
<SimpleSource>
<SourceFilename relativeToVRT="1">uint16.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">int32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_phase_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>Phase</Description>
<PixelFunctionType>phase</PixelFunctionType>
<SourceTransferType>CFloat64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_phase_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>Phase</Description>
<PixelFunctionType>phase</PixelFunctionType>
<SourceTransferType>Float64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">pixfun_imag_c.vrt</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_real_c.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="5" rasterYSize="6">
<VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
<Description>Real part</Description>
<PixelFunctionType>real</PixelFunctionType>
<SourceTransferType>CFloat64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">cint_sar.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="5" ySize="6"/>
<DstRect xOff="0" yOff="0" xSize="5" ySize="6"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_real_r.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Int32" band="1" subClass="VRTDerivedRasterBand">
<Description>Real part</Description>
<PixelFunctionType>real</PixelFunctionType>
<SourceTransferType>CFloat64</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">int32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
13 changes: 13 additions & 0 deletions autotest/gdrivers/data/pixfun_sqrt.vrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<VRTDataset rasterXSize="20" rasterYSize="20">
<VRTRasterBand dataType="Float32" band="1" subClass="VRTDerivedRasterBand">
<Description>Square root</Description>
<PixelFunctionType>sqrt</PixelFunctionType>
<SourceTransferType>Float32</SourceTransferType>
<SimpleSource>
<SourceFilename relativeToVRT="1">float32.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="20" ySize="20"/>
<DstRect xOff="0" yOff="0" xSize="20" ySize="20"/>
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
Loading

0 comments on commit dbd8187

Please sign in to comment.