@@ -1584,10 +1584,15 @@ public override PixImage RemappedPixImage(
1584
1584
ImageInterpolation ip = ImageInterpolation . Cubic
1585
1585
) => Remapped ( xMap , xMap , ip ) ;
1586
1586
1587
- public PixImage < T > Remapped (
1588
- Matrix < float > xMap , Matrix < float > yMap ,
1589
- ImageInterpolation ip = ImageInterpolation . Cubic
1590
- ) => new PixImage < T > ( Format , s_remappedFun ( Volume , xMap , yMap , ip ) ) ;
1587
+ public PixImage < T > Remapped ( Matrix < float > xMap , Matrix < float > yMap , ImageInterpolation ip = ImageInterpolation . Cubic )
1588
+ {
1589
+ if ( s_remappedFun == null )
1590
+ {
1591
+ throw new NotSupportedException ( $ "No remapping function has been installed via PixImage<{ ( typeof ( T ) . Name ) } >.SetRemappedFun") ;
1592
+ }
1593
+
1594
+ return new PixImage < T > ( Format , s_remappedFun ( Volume , xMap , yMap , ip ) ) ;
1595
+ }
1591
1596
1592
1597
private static Func < Volume < T > , Matrix < float > , Matrix < float > , ImageInterpolation , Volume < T > > s_remappedFun = null ;
1593
1598
@@ -1618,10 +1623,15 @@ public override PixImage RotatedPixImage(
1618
1623
ImageInterpolation ip = ImageInterpolation . Cubic
1619
1624
) => Rotated ( angleInRadiansCCW , resize , ip ) ;
1620
1625
1621
- public PixImage < T > Rotated (
1622
- double angleInRadiansCCW , bool resize = true ,
1623
- ImageInterpolation ip = ImageInterpolation . Cubic
1624
- ) => new PixImage < T > ( Format , s_rotatedFun ( Volume , angleInRadiansCCW , resize , ip ) ) ;
1626
+ public PixImage < T > Rotated ( double angleInRadiansCCW , bool resize = true , ImageInterpolation ip = ImageInterpolation . Cubic )
1627
+ {
1628
+ if ( s_rotatedFun == null )
1629
+ {
1630
+ throw new NotSupportedException ( $ "No rotating function has been installed via PixImage<{ ( typeof ( T ) . Name ) } >.SetRotatedFun") ;
1631
+ }
1632
+
1633
+ return new PixImage < T > ( Format , s_rotatedFun ( Volume , angleInRadiansCCW , resize , ip ) ) ;
1634
+ }
1625
1635
1626
1636
private static Func < Volume < T > , double , bool , ImageInterpolation , Volume < T > > s_rotatedFun = null ;
1627
1637
@@ -1640,6 +1650,11 @@ public PixImage<T> Scaled(
1640
1650
V2d scaleFactor ,
1641
1651
ImageInterpolation ip = ImageInterpolation . Cubic )
1642
1652
{
1653
+ if ( s_scaledFun == null )
1654
+ {
1655
+ throw new NotSupportedException ( $ "No scaling function has been installed via PixImage<{ ( typeof ( T ) . Name ) } >.SetScaledFun") ;
1656
+ }
1657
+
1643
1658
if ( ! ( scaleFactor . X > 0.0 && scaleFactor . Y > 0.0 ) ) throw new ArgumentOutOfRangeException ( nameof ( scaleFactor ) ) ;
1644
1659
1645
1660
// SuperSample is only available for scale factors < 1; fall back to Cubic
0 commit comments