Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BigDataViewer_Fiji_Plugin
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_Fiji_Plugin
Commits
160cc1d6
Commit
160cc1d6
authored
10 years ago
by
Tobias Pietzsch
Browse files
Options
Downloads
Patches
Plain Diff
contruct ImgOpener with a Context that works (for now) in both Eclipse and Fiji
parent
1c6284a9
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/ij/ExportSpimSequencePlugIn.java
+4
-0
4 additions, 0 deletions
src/main/java/bdv/ij/ExportSpimSequencePlugIn.java
src/main/java/bdv/ij/export/imgloader/StackImageLoader.java
+7
-15
7 additions, 15 deletions
src/main/java/bdv/ij/export/imgloader/StackImageLoader.java
with
11 additions
and
15 deletions
src/main/java/bdv/ij/ExportSpimSequencePlugIn.java
+
4
−
0
View file @
160cc1d6
...
@@ -709,6 +709,10 @@ public class ExportSpimSequencePlugIn implements PlugIn
...
@@ -709,6 +709,10 @@ public class ExportSpimSequencePlugIn implements PlugIn
public
static
void
main
(
final
String
[]
args
)
public
static
void
main
(
final
String
[]
args
)
{
{
Bead_Registration
.
spimDataDirectory
=
"/Users/pietzsch/workspace/data/openspim"
;
Bead_Registration
.
fileNamePattern
=
"spim_TL{tt}_Angle{a}.tif"
;
Bead_Registration
.
timepoints
=
"0"
;
Bead_Registration
.
angles
=
"0"
;
new
ExportSpimSequencePlugIn
().
run
(
null
);
new
ExportSpimSequencePlugIn
().
run
(
null
);
}
}
}
}
This diff is collapsed.
Click to expand it.
src/main/java/bdv/ij/export/imgloader/StackImageLoader.java
+
7
−
15
View file @
160cc1d6
package
bdv.ij.export.imgloader
;
package
bdv.ij.export.imgloader
;
import
ij.IJ
;
import
ij.ImagePlus
;
import
ij.ImagePlus
;
import
io.scif.SCIFIOService
;
import
io.scif.img.ImgIOException
;
import
io.scif.img.ImgIOException
;
import
io.scif.img.ImgOpener
;
import
io.scif.img.ImgOpener
;
...
@@ -21,6 +21,10 @@ import net.imglib2.meta.ImgPlus;
...
@@ -21,6 +21,10 @@ import net.imglib2.meta.ImgPlus;
import
net.imglib2.type.numeric.integer.UnsignedByteType
;
import
net.imglib2.type.numeric.integer.UnsignedByteType
;
import
net.imglib2.type.numeric.integer.UnsignedShortType
;
import
net.imglib2.type.numeric.integer.UnsignedShortType
;
import
org.scijava.Context
;
import
org.scijava.app.AppService
;
import
org.scijava.app.StatusService
;
/**
/**
* This {@link ImgLoader} loads images that represent a 3D stack in a single
* This {@link ImgLoader} loads images that represent a 3D stack in a single
...
@@ -33,7 +37,7 @@ import net.imglib2.type.numeric.integer.UnsignedShortType;
...
@@ -33,7 +37,7 @@ import net.imglib2.type.numeric.integer.UnsignedShortType;
*/
*/
public
class
StackImageLoader
implements
BasicImgLoader
<
UnsignedShortType
>
public
class
StackImageLoader
implements
BasicImgLoader
<
UnsignedShortType
>
{
{
private
ImgOpener
opener
;
private
final
ImgOpener
opener
;
private
final
ArrayImgFactory
<
UnsignedShortType
>
factory
;
private
final
ArrayImgFactory
<
UnsignedShortType
>
factory
;
...
@@ -47,14 +51,7 @@ public class StackImageLoader implements BasicImgLoader< UnsignedShortType >
...
@@ -47,14 +51,7 @@ public class StackImageLoader implements BasicImgLoader< UnsignedShortType >
{
{
this
.
filenames
=
filenames
;
this
.
filenames
=
filenames
;
this
.
useImageJOpener
=
useImageJOpener
;
this
.
useImageJOpener
=
useImageJOpener
;
try
opener
=
useImageJOpener
?
null
:
new
ImgOpener
(
new
Context
(
SCIFIOService
.
class
,
AppService
.
class
,
StatusService
.
class
)
);
{
opener
=
new
ImgOpener
();
}
catch
(
final
Exception
e
)
{
e
.
printStackTrace
();
}
factory
=
new
ArrayImgFactory
<
UnsignedShortType
>();
factory
=
new
ArrayImgFactory
<
UnsignedShortType
>();
type
=
new
UnsignedShortType
();
type
=
new
UnsignedShortType
();
}
}
...
@@ -65,11 +62,6 @@ public class StackImageLoader implements BasicImgLoader< UnsignedShortType >
...
@@ -65,11 +62,6 @@ public class StackImageLoader implements BasicImgLoader< UnsignedShortType >
final
String
fn
=
filenames
.
get
(
view
);
final
String
fn
=
filenames
.
get
(
view
);
if
(
useImageJOpener
)
if
(
useImageJOpener
)
{
{
if
(
opener
==
null
)
{
IJ
.
showMessage
(
"Error"
,
"Error: Could not create io.scif.img.ImgOpener"
);
return
null
;
}
final
ImagePlus
imp
=
new
ImagePlus
(
fn
);
final
ImagePlus
imp
=
new
ImagePlus
(
fn
);
if
(
imp
.
getType
()
==
ImagePlus
.
GRAY16
)
if
(
imp
.
getType
()
==
ImagePlus
.
GRAY16
)
return
new
ImgPlus
<
UnsignedShortType
>(
ImageJFunctions
.
wrapShort
(
imp
)
);
return
new
ImgPlus
<
UnsignedShortType
>(
ImageJFunctions
.
wrapShort
(
imp
)
);
...
...
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