@@ -95,35 +95,56 @@ private int pseudoRandom() {
9595 return seed = 3170425 * seed + 132102 ;
9696 }
9797
98-
99-
98+ /**
99+ * Open a sample image from a resource path relative to {@link AbstractOpTest}
100+ */
100101 public Img <FloatType > openFloatImg (final String resourcePath ) {
101- return openFloatImg (getClass (), resourcePath );
102+ return openRelativeFloatImg (getClass (), resourcePath );
102103 }
103104
105+ /**
106+ * Open a sample image from a resource path relative to {@link AbstractOpTest}
107+ */
104108 public Img <DoubleType > openDoubleImg (final String resourcePath ) {
105- return openDoubleImg (getClass (), resourcePath );
109+ return openRelativeDoubleImg (getClass (), resourcePath );
110+ }
111+
112+ /**
113+ * Open a sample image from a resource path relative to {@link AbstractOpTest}
114+ */
115+ public Img <UnsignedByteType > openUnsignedByteImg (final String resourcePath )
116+ {
117+ return openRelativeUnsignedByteImg (getClass (), resourcePath );
106118 }
107119
108- public static Img <FloatType > openFloatImg (final Class <?> c ,
120+ /**
121+ * Open a sample image from a resource path relative to a specified base class
122+ */
123+ public static Img <FloatType > openRelativeFloatImg (final Class <?> base ,
109124 final String resourcePath )
110125 {
111- final URL url = c .getResource (resourcePath );
126+ final URL url = base .getResource (resourcePath );
112127 return IO .openFloat (url .getPath ()).getImg ();
113128 }
114129
115- public static Img <UnsignedByteType > openUnsignedByteType (final Class <?> c ,
130+ /**
131+ * Open a sample image from a resource path relative to a specified base class
132+ */
133+ public static Img <DoubleType > openRelativeDoubleImg (final Class <?> base ,
116134 final String resourcePath )
117135 {
118- final URL url = c .getResource (resourcePath );
119- return IO .openUnsignedByte (url .getPath ()).getImg ();
136+ final URL url = base .getResource (resourcePath );
137+ return IO .openDouble (url .getPath ()).getImg ();
120138 }
121139
122- public static Img <DoubleType > openDoubleImg (final Class <?> c ,
140+ /**
141+ * Open a sample image from a resource path relative to a specified base class
142+ */
143+ public static Img <UnsignedByteType > openRelativeUnsignedByteImg (final Class <?> base ,
123144 final String resourcePath )
124145 {
125- final URL url = c .getResource (resourcePath );
126- return IO .openDouble (url .getPath ()).getImg ();
146+ final URL url = base .getResource (resourcePath );
147+ return IO .openUnsignedByte (url .getPath ()).getImg ();
127148 }
128149
129150 public static <T > RandomAccessible <T > deinterval (
0 commit comments