Skip to content

Commit 70fe002

Browse files
committed
Use the ScaledBrightnessARGBConverter to displaY ARGB image in the BDV
With this converter, the control slider of ARGB sources controls the brightness of the display. This is better suited for segmentation overlays in the shape of label images.
1 parent 992bc84 commit 70fe002

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/java/bdv/BigDataViewer.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
import net.imglib2.converter.Converter;
5858
import net.imglib2.display.ColorConverter;
5959
import net.imglib2.display.RealARGBColorConverter;
60-
import net.imglib2.display.ScaledARGBConverter;
60+
import net.imglib2.display.ScaledBrightnessARGBConverter;
6161
import net.imglib2.type.numeric.ARGBType;
6262
import net.imglib2.type.numeric.NumericType;
6363
import net.imglib2.type.numeric.RealType;
@@ -190,10 +190,10 @@ private static String createSetupName( final BasicViewSetup setup )
190190
* <ul>
191191
* <li>For {@code RealType}s a {@link RealARGBColorConverter} is
192192
* returned.</li>
193-
* <li>For {@code ARGBType}s a {@link ScaledARGBConverter.ARGB} is
193+
* <li>For {@code ARGBType}s a {@link ScaledBrightnessARGBConverter.ARGB} is
194194
* returned.</li>
195195
* <li>For {@code VolatileARGBType}s a
196-
* {@link ScaledARGBConverter.VolatileARGB} is returned.</li>
196+
* {@link ScaledBrightnessARGBConverter.VolatileARGB} is returned.</li>
197197
* </ul>
198198
*/
199199
@SuppressWarnings( "unchecked" )
@@ -207,9 +207,9 @@ public static < T extends NumericType< T > > Converter< T, ARGBType > createConv
207207
return ( Converter< T, ARGBType > ) RealARGBColorConverter.create( t, typeMin, typeMax );
208208
}
209209
else if ( type instanceof ARGBType )
210-
return ( Converter< T, ARGBType > ) new ScaledARGBConverter.ARGB( 0, 255 );
210+
return ( Converter< T, ARGBType > ) new ScaledBrightnessARGBConverter.ARGB( 0, 255 );
211211
else if ( type instanceof VolatileARGBType )
212-
return ( Converter< T, ARGBType > ) new ScaledARGBConverter.VolatileARGB( 0, 255 );
212+
return ( Converter< T, ARGBType > ) new ScaledBrightnessARGBConverter.VolatileARGB( 0, 255 );
213213
else
214214
throw new IllegalArgumentException( "ImgLoader of type " + type.getClass() + " not supported." );
215215
}

0 commit comments

Comments
 (0)