Skip to content
Snippets Groups Projects
Commit a04c5af6 authored by Stephan Saalfeld's avatar Stephan Saalfeld
Browse files

min intensity hack hot-knife alignment

parent 1e39c249
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<properties>
<enforcer.skip>true</enforcer.skip>
</properties>
<parent> <parent>
<groupId>sc.fiji</groupId> <groupId>sc.fiji</groupId>
<artifactId>pom-bigdataviewer</artifactId> <artifactId>pom-bigdataviewer</artifactId>
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
* %% * %%
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, * 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer. * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice, * 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
...@@ -690,7 +690,8 @@ public class BigDataViewer ...@@ -690,7 +690,8 @@ public class BigDataViewer
// final String fn = "/Users/Pietzsch/Desktop/bdv example/drosophila 2.xml"; // final String fn = "/Users/Pietzsch/Desktop/bdv example/drosophila 2.xml";
// final String fn = "/Users/pietzsch/Desktop/data/clusterValia/140219-1/valia-140219-1.xml"; // final String fn = "/Users/pietzsch/Desktop/data/clusterValia/140219-1/valia-140219-1.xml";
// final String fn = "/Users/Pietzsch/Desktop/data/catmaid.xml"; // final String fn = "/Users/Pietzsch/Desktop/data/catmaid.xml";
final String fn = "src/main/resources/openconnectome-bock11-neariso.xml"; // final String fn2 = "src/main/resources/openconnectome-bock11-neariso.xml";
final String fn1 = "/nrs/saalfeld/tomoko/24gb_n_10_l_9_tfac_m5_xlfac_0_ylfac_0_xfac_2_yfac_5_deg_2.xml";
// final String fn = "/home/saalfeld/catmaid.xml"; // final String fn = "/home/saalfeld/catmaid.xml";
// final String fn = "/home/saalfeld/catmaid-fafb00-v9.xml"; // final String fn = "/home/saalfeld/catmaid-fafb00-v9.xml";
// final String fn = "/home/saalfeld/catmaid-fafb00-sample_A_cutout_3k.xml"; // final String fn = "/home/saalfeld/catmaid-fafb00-sample_A_cutout_3k.xml";
...@@ -712,7 +713,10 @@ public class BigDataViewer ...@@ -712,7 +713,10 @@ public class BigDataViewer
{ {
System.setProperty( "apple.laf.useScreenMenuBar", "true" ); System.setProperty( "apple.laf.useScreenMenuBar", "true" );
final BigDataViewer bdv = open( fn, new File( fn ).getName(), new ProgressWriterConsole(), ViewerOptions.options() ); final BigDataViewer bdv1 = open( fn1, new File( fn1 ).getName(), new ProgressWriterConsole(), ViewerOptions.options() );
// final BigDataViewer bdv2 = open( fn2, new File( fn2 ).getName(), new ProgressWriterConsole(), ViewerOptions.options() );
bdv1.getViewerFrame().setSize( 1248, 656 );
// DumpInputConfig.writeToYaml( System.getProperty( "user.home" ) + "/.bdv/bdvkeyconfig.yaml", bdv.getViewerFrame() ); // DumpInputConfig.writeToYaml( System.getProperty( "user.home" ) + "/.bdv/bdvkeyconfig.yaml", bdv.getViewerFrame() );
} }
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
* %% * %%
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, * 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer. * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice, * 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
...@@ -244,7 +244,12 @@ public class OpenConnectomeImageLoader extends AbstractViewerSetupImgLoader< Uns ...@@ -244,7 +244,12 @@ public class OpenConnectomeImageLoader extends AbstractViewerSetupImgLoader< Uns
* Create a {@link VolatileCachedCellImg} backed by the cache. The type * Create a {@link VolatileCachedCellImg} backed by the cache. The type
* should be either {@link ARGBType} and {@link VolatileARGBType}. * should be either {@link ARGBType} and {@link VolatileARGBType}.
*/ */
protected < T extends NativeType< T > > VolatileCachedCellImg< T, VolatileByteArray > prepareCachedImage( final int timepointId, final int setupId, final int level, final LoadingStrategy loadingStrategy, final T type ) protected < T extends NativeType< T > > VolatileCachedCellImg< T, VolatileByteArray > prepareCachedImage(
final int timepointId,
final int setupId,
final int level,
final LoadingStrategy loadingStrategy,
final T type )
{ {
final long[] dimensions = imageDimensions[ level ]; final long[] dimensions = imageDimensions[ level ];
final int[] cellDimensions = blockDimensions[ level ]; final int[] cellDimensions = blockDimensions[ level ];
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
* %% * %%
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, * 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer. * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice, * 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
...@@ -31,6 +31,7 @@ package bdv.spimdata.tools; ...@@ -31,6 +31,7 @@ package bdv.spimdata.tools;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
...@@ -38,10 +39,6 @@ import java.util.Map; ...@@ -38,10 +39,6 @@ import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Set; import java.util.Set;
import mpicbg.spim.data.SpimDataException;
import mpicbg.spim.data.registration.ViewRegistration;
import mpicbg.spim.data.registration.ViewRegistrations;
import mpicbg.spim.data.registration.ViewTransform;
import bdv.export.ExportMipmapInfo; import bdv.export.ExportMipmapInfo;
import bdv.export.WriteSequenceToHdf5; import bdv.export.WriteSequenceToHdf5;
import bdv.img.hdf5.Hdf5ImageLoader; import bdv.img.hdf5.Hdf5ImageLoader;
...@@ -49,6 +46,12 @@ import bdv.img.hdf5.Partition; ...@@ -49,6 +46,12 @@ import bdv.img.hdf5.Partition;
import bdv.spimdata.SequenceDescriptionMinimal; import bdv.spimdata.SequenceDescriptionMinimal;
import bdv.spimdata.SpimDataMinimal; import bdv.spimdata.SpimDataMinimal;
import bdv.spimdata.XmlIoSpimDataMinimal; import bdv.spimdata.XmlIoSpimDataMinimal;
import mpicbg.spim.data.SpimDataException;
import mpicbg.spim.data.registration.ViewRegistration;
import mpicbg.spim.data.registration.ViewRegistrations;
import mpicbg.spim.data.registration.ViewTransform;
import mpicbg.spim.data.registration.ViewTransformAffine;
import net.imglib2.realtransform.AffineTransform3D;
/** /**
* @author Tobias Pietzsch &lt;tobias.pietzsch@gmail.com&gt; * @author Tobias Pietzsch &lt;tobias.pietzsch@gmail.com&gt;
...@@ -136,4 +139,22 @@ public class MergeExample ...@@ -136,4 +139,22 @@ public class MergeExample
WriteSequenceToHdf5.writeHdf5PartitionLinkFile( seq, newMipmapInfos ); WriteSequenceToHdf5.writeHdf5PartitionLinkFile( seq, newMipmapInfos );
io.save( spimData, xmlFilename ); io.save( spimData, xmlFilename );
} }
public static void main( final String... args ) throws SpimDataException
{
final AffineTransform3D t1 = new AffineTransform3D();
final AffineTransform3D t2 = new AffineTransform3D();
t2.set( 70, 0, 3 );
mergeHdf5Views(
Arrays.asList( new String[]{
"/groups/saalfeld/home/saalfelds/tmp/dagmar/bdv-26.xml",
"/groups/saalfeld/home/saalfelds/tmp/dagmar/bdv-27.xml"
} ),
Arrays.asList( new ViewTransformAffine[]{
new ViewTransformAffine( "t1", t1 ),
new ViewTransformAffine( "t2", t2 )
} ),
"/groups/saalfeld/home/saalfelds/tmp/dagmar/bdv-26-27.xml" );
}
} }
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
* %% * %%
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, * 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer. * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice, * 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
...@@ -32,11 +32,11 @@ package bdv.viewer.render; ...@@ -32,11 +32,11 @@ package bdv.viewer.render;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import bdv.viewer.Source;
import net.imglib2.Cursor; import net.imglib2.Cursor;
import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessible;
import net.imglib2.RandomAccessibleInterval; import net.imglib2.RandomAccessibleInterval;
import net.imglib2.type.numeric.ARGBType; import net.imglib2.type.numeric.ARGBType;
import bdv.viewer.Source;
public class AccumulateProjectorARGB extends AccumulateProjector< ARGBType, ARGBType > public class AccumulateProjectorARGB extends AccumulateProjector< ARGBType, ARGBType >
{ {
...@@ -68,7 +68,7 @@ public class AccumulateProjectorARGB extends AccumulateProjector< ARGBType, ARGB ...@@ -68,7 +68,7 @@ public class AccumulateProjectorARGB extends AccumulateProjector< ARGBType, ARGB
@Override @Override
protected void accumulate( final Cursor< ARGBType >[] accesses, final ARGBType target ) protected void accumulate( final Cursor< ARGBType >[] accesses, final ARGBType target )
{ {
int aSum = 0, rSum = 0, gSum = 0, bSum = 0; int aSum = 0, rSum = 255, gSum = 255, bSum = 255;
for ( final Cursor< ARGBType > access : accesses ) for ( final Cursor< ARGBType > access : accesses )
{ {
final int value = access.get().get(); final int value = access.get().get();
...@@ -76,19 +76,36 @@ public class AccumulateProjectorARGB extends AccumulateProjector< ARGBType, ARGB ...@@ -76,19 +76,36 @@ public class AccumulateProjectorARGB extends AccumulateProjector< ARGBType, ARGB
final int r = ARGBType.red( value ); final int r = ARGBType.red( value );
final int g = ARGBType.green( value ); final int g = ARGBType.green( value );
final int b = ARGBType.blue( value ); final int b = ARGBType.blue( value );
aSum += a; // aSum += a;
rSum += r; // rSum += r;
gSum += g; // gSum += g;
bSum += b; // bSum += b;
if (!(r == 0 && g == 0 && b == 0))
{
aSum = Math.max( aSum, a );
rSum = Math.min( rSum, r );
gSum = Math.min( gSum, g );
bSum = Math.min( bSum, b );
}
} }
if ( aSum > 255 ) if ( aSum == 0 )
{
aSum = 255; aSum = 255;
if ( rSum > 255 ) rSum = 0;
rSum = 255; gSum = 0;
if ( gSum > 255 ) bSum = 0;
gSum = 255; }
if ( bSum > 255 ) else
bSum = 255; {
if ( aSum > 255 )
aSum = 255;
if ( rSum > 255 )
rSum = 255;
if ( gSum > 255 )
gSum = 255;
if ( bSum > 255 )
bSum = 255;
}
target.set( ARGBType.rgba( rSum, gSum, bSum, aSum ) ); target.set( ARGBType.rgba( rSum, gSum, bSum, aSum ) );
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment