Skip to content

Commit

Permalink
v.0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ekatrukha committed Nov 10, 2023
1 parent 19a9e3d commit 02a9017
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 deletions.
2 changes: 0 additions & 2 deletions src/main/java/btbvv/btcards/BoundedRangeEditorBT.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ private BoundedRangeEditorBT(
@Override
public void actionPerformed(ActionEvent e)
{
// final boolean bSelected = cbSync.isSelected();
// bSync = bSelected;
bSync = cbSync.isSelected();

}
Expand Down
31 changes: 12 additions & 19 deletions src/test/java/bvv/vistools/examples/BT_Example01.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,33 @@ public class BT_Example01 {
*/
public static void main( final String[] args )
{
//regular tif
/*
//regular tif init
/**/
final ImagePlus imp = IJ.openImage( "https://imagej.nih.gov/ij/images/t1-head.zip" );
//final ImagePlus imp = IJ.openImage( "/home/eugene/Desktop/head/t1-head.tif" );
final Img< UnsignedShortType > img = ImageJFunctions.wrapShort( imp );
final BvvSource source = BvvFunctions.show( img, "t1-head" );

// double [] minI = img.minAsDoubleArray();
// double [] maxI = img.maxAsDoubleArray();
*/
//BDV XML test
double [] minI = img.minAsDoubleArray();
double [] maxI = img.maxAsDoubleArray();
/**/


//BDV XML init
/*
final String xmlFilename = "/home/eugene/Desktop/head/export.xml";
SpimDataMinimal spimData = null;
try {
spimData = new XmlIoSpimDataMinimal().load( xmlFilename );
} catch (SpimDataException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}// //BDV XML
// double [] minI = spimData.getSequenceDescription().getImgLoader().getSetupImgLoader(0).getImage(0).minAsDoubleArray();
// double [] maxI = spimData.getSequenceDescription().getImgLoader().getSetupImgLoader(0).getImage(0).maxAsDoubleArray();
}
final List< BvvStackSource< ? > > sources = BvvFunctions.show( spimData );
final BvvSource source = sources.get(0);
//BDV XML
double [] minI = spimData.getSequenceDescription().getImgLoader().getSetupImgLoader(0).getImage(0).minAsDoubleArray();
double [] maxI = spimData.getSequenceDescription().getImgLoader().getSetupImgLoader(0).getImage(0).maxAsDoubleArray();
/**/
*/

source.setDisplayRange(0, 655);
source.setDisplayGamma(0.5);
Expand All @@ -76,14 +75,8 @@ public static void main( final String[] args )
source.setLUT(getRGBLutTable("Fire"));

//crop half of the volume along Z axis in the shaders
//cropInterval is defined inside the "raw", non-transformed data interval





minI[2]=0.5*maxI[2];

//cropInterval is defined inside the "raw", non-transformed data interval
minI[2]=0.5*maxI[2];
source.setCropInterval(new FinalRealInterval(minI,maxI));


Expand Down

0 comments on commit 02a9017

Please sign in to comment.