Skip to content

Commit

Permalink
Merge Nico's commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tischi committed Dec 17, 2019
1 parent 4c11d55 commit 5ff86fb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
public class BdvAppendSampleCommand implements Command {

@Parameter(type = ItemIO.BOTH)
BdvHandle bdvh;
public BdvHandle bdvh;

@Parameter(choices = {"Mandelbrot", "Wave3D", "Voronoi", "Big Voronoi"})
String sampleName;
public String sampleName;

@Override
public void run() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,33 @@
import sc.fiji.bdvpg.bdv.navigate.ViewerTransformAdjuster;
import sc.fiji.bdvpg.bdv.source.append.SourceAdder;
import sc.fiji.bdvpg.source.importer.SourceLoader;
import sc.fiji.bdvpg.source.importer.samples.VoronoiSourceGetter;

public class BrightnessAutoAdjusterDemo
{
public static void main( String[] args )
{
// Open BigDataViewer
// Mri stack
BdvHandle bdvHandle = BDVSingleton.getInstance();

final String filePath = "src/test/resources/mri-stack.xml";
final Source source = getMriSource();
addSource( bdvHandle, source );

// Voronoi
final Source voronoiSource = new VoronoiSourceGetter( new long[]{ 512, 512, 1 }, 256, true ).get();
addSource( bdvHandle, voronoiSource );
}

public static Source getMriSource()
{
final String filePath = "src/test/resources/mri-stack.xml";
final SourceLoader sourceLoader = new SourceLoader( filePath );
sourceLoader.run();
final Source source = sourceLoader.getSource( 0 );
return sourceLoader.getSource( 0 );
}

public static void addSource( BdvHandle bdvHandle, Source source )
{
new SourceAdder( bdvHandle, source ).run();
new ViewerTransformAdjuster( bdvHandle, source ).run();
new BrightnessAutoAdjuster( bdvHandle, source ).run();
Expand Down

0 comments on commit 5ff86fb

Please sign in to comment.