Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BigDataViewer_Core_Extension
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BioinformaticDataCompression
BigDataViewer_Core_Extension
Commits
795d67ad
Commit
795d67ad
authored
11 years ago
by
Tobias Pietzsch
Browse files
Options
Downloads
Patches
Plain Diff
handle ARGBType ViewerImgLoader
parent
928e1424
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/bdv/BigDataViewer.java
+28
-16
28 additions, 16 deletions
src/main/java/bdv/BigDataViewer.java
src/main/java/bdv/VolatileSpimSource.java
+1
-2
1 addition, 2 deletions
src/main/java/bdv/VolatileSpimSource.java
with
29 additions
and
18 deletions
src/main/java/bdv/BigDataViewer.java
+
28
−
16
View file @
795d67ad
...
...
@@ -14,11 +14,13 @@ import javax.swing.filechooser.FileFilter;
import
mpicbg.spim.data.SequenceDescription
;
import
net.imglib2.Volatile
;
import
net.imglib2.converter.Converter
;
import
net.imglib2.converter.TypeIdentity
;
import
net.imglib2.display.RealARGBColorConverter
;
import
net.imglib2.type.numeric.ARGBType
;
import
net.imglib2.type.numeric.NumericType
;
import
net.imglib2.type.numeric.RealType
;
import
net.imglib2.type.volatiles.VolatileARGBType
;
import
org.jdom2.Document
;
import
org.jdom2.Element
;
...
...
@@ -120,20 +122,27 @@ public class BigDataViewer
final
SequenceDescription
seq
=
loader
.
getSequenceDescription
();
for
(
int
setup
=
0
;
setup
<
seq
.
numViewSetups
();
++
setup
)
{
final
TypeIdentity
<
ARGBType
>
vconverter
=
new
TypeIdentity
<
ARGBType
>();
final
Converter
<
VolatileARGBType
,
ARGBType
>
vconverter
=
new
Converter
<
VolatileARGBType
,
ARGBType
>()
{
@Override
public
void
convert
(
final
VolatileARGBType
input
,
final
ARGBType
output
)
{
output
.
set
(
input
.
get
()
);
}
};
final
TypeIdentity
<
ARGBType
>
converter
=
new
TypeIdentity
<
ARGBType
>();
//
final VolatileSpimSource< ARGBType, VolatileARGBType > vs = new VolatileSpimSource< ARGBType, VolatileARGBType >( loader, setup, "angle " + seq.setups.get( setup ).getAngle() );
//
final SpimSource< ARGBType > s = vs.nonVolatile();
//
//
// Decorate each source with an extra transformation, that can be edited manually in this viewer.
//
final TransformedSource< VolatileARGBType > tvs = new TransformedSource< VolatileARGBType >( vs );
//
final TransformedSource< ARGBType > ts = new TransformedSource< ARGBType >( s, tvs );
//
//
final SourceAndConverter< VolatileARGBType > vsoc = new SourceAndConverter< VolatileARGBType >( tvs, vconverter );
//
final SourceAndConverter< ARGBType > soc = new SourceAndConverter< ARGBType >( ts, converter, vsoc );
//
//
sources.add( soc );
final
VolatileSpimSource
<
ARGBType
,
VolatileARGBType
>
vs
=
new
VolatileSpimSource
<
ARGBType
,
VolatileARGBType
>(
loader
,
setup
,
"angle "
+
seq
.
setups
.
get
(
setup
).
getAngle
()
);
final
SpimSource
<
ARGBType
>
s
=
vs
.
nonVolatile
();
// Decorate each source with an extra transformation, that can be edited manually in this viewer.
final
TransformedSource
<
VolatileARGBType
>
tvs
=
new
TransformedSource
<
VolatileARGBType
>(
vs
);
final
TransformedSource
<
ARGBType
>
ts
=
new
TransformedSource
<
ARGBType
>(
s
,
tvs
);
final
SourceAndConverter
<
VolatileARGBType
>
vsoc
=
new
SourceAndConverter
<
VolatileARGBType
>(
tvs
,
vconverter
);
final
SourceAndConverter
<
ARGBType
>
soc
=
new
SourceAndConverter
<
ARGBType
>(
ts
,
converter
,
vsoc
);
sources
.
add
(
soc
);
}
}
...
...
@@ -175,9 +184,12 @@ public class BigDataViewer
manualTransformationEditor
=
new
ManualTransformationEditor
(
viewer
,
viewerFrame
.
getKeybindings
()
);
setupAssignments
=
new
SetupAssignments
(
converterSetups
,
0
,
65535
);
final
MinMaxGroup
group
=
setupAssignments
.
getMinMaxGroups
().
get
(
0
);
for
(
final
ConverterSetup
setup
:
setupAssignments
.
getConverterSetups
()
)
setupAssignments
.
moveSetupToGroup
(
setup
,
group
);
if
(
setupAssignments
.
getMinMaxGroups
().
size
()
>
0
)
{
final
MinMaxGroup
group
=
setupAssignments
.
getMinMaxGroups
().
get
(
0
);
for
(
final
ConverterSetup
setup
:
setupAssignments
.
getConverterSetups
()
)
setupAssignments
.
moveSetupToGroup
(
setup
,
group
);
}
brightnessDialog
=
new
BrightnessDialog
(
viewerFrame
,
setupAssignments
);
...
...
@@ -368,7 +380,7 @@ public class BigDataViewer
public
static
void
main
(
final
String
[]
args
)
{
final
String
fn
=
"/Users/pietzsch/desktop/data/catmaid.xml"
;
final
String
fn
=
"/Users/pietzsch/desktop/data/catmaid
-confocal
.xml"
;
// final String fn = "/Users/pietzsch/desktop/data/BDV130418A325/BDV130418A325_NoTempReg.xml";
// final String fn = "/Users/pietzsch/Desktop/data/valia2/valia.xml";
// final String fn = "/Users/pietzsch/workspace/data/fast fly/111010_weber/combined.xml";
...
...
This diff is collapsed.
Click to expand it.
src/main/java/bdv/VolatileSpimSource.java
+
1
−
2
View file @
795d67ad
...
...
@@ -31,8 +31,7 @@ public class VolatileSpimSource< T extends NumericType< T >, V extends Volatile<
if
(
isPresent
(
timepoint
)
)
{
final
V
zero
=
imgLoader
.
getVolatileImageType
().
createVariable
();
// TODO: change to zero.setZero(); the following is just for debugging
(
(
RealType
<
?
>
)
zero
).
setReal
(
128
);
zero
.
setZero
();
final
View
view
=
sequenceViews
.
getView
(
timepoint
,
setup
);
final
AffineTransform3D
reg
=
view
.
getModel
();
final
AffineTransform3D
mipmapTransform
=
new
AffineTransform3D
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment