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
9b4da64f
Commit
9b4da64f
authored
11 years ago
by
Stephan Saalfeld
Browse files
Options
Downloads
Patches
Plain Diff
Catmaid implements mipmapTransforms
parent
c1a4ffc2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/bdv/img/catmaid/CatmaidImageLoader.java
+18
-1
18 additions, 1 deletion
src/main/java/bdv/img/catmaid/CatmaidImageLoader.java
with
18 additions
and
1 deletion
src/main/java/bdv/img/catmaid/CatmaidImageLoader.java
+
18
−
1
View file @
9b4da64f
...
@@ -7,6 +7,7 @@ import net.imglib2.RandomAccessibleInterval;
...
@@ -7,6 +7,7 @@ import net.imglib2.RandomAccessibleInterval;
import
net.imglib2.img.NativeImg
;
import
net.imglib2.img.NativeImg
;
import
net.imglib2.img.basictypeaccess.volatiles.array.VolatileIntArray
;
import
net.imglib2.img.basictypeaccess.volatiles.array.VolatileIntArray
;
import
net.imglib2.img.cell.CellImg
;
import
net.imglib2.img.cell.CellImg
;
import
net.imglib2.realtransform.AffineTransform3D
;
import
net.imglib2.type.NativeType
;
import
net.imglib2.type.NativeType
;
import
net.imglib2.type.numeric.ARGBType
;
import
net.imglib2.type.numeric.ARGBType
;
import
net.imglib2.type.volatiles.VolatileARGBType
;
import
net.imglib2.type.volatiles.VolatileARGBType
;
...
@@ -45,8 +46,10 @@ public class CatmaidImageLoader extends AbstractViewerImgLoader< ARGBType, Volat
...
@@ -45,8 +46,10 @@ public class CatmaidImageLoader extends AbstractViewerImgLoader< ARGBType, Volat
private
long
[][]
imageDimensions
;
private
long
[][]
imageDimensions
;
private
int
[][]
blockDimensions
;
private
int
[][]
blockDimensions
;
private
AffineTransform3D
[]
mipmapTransforms
;
pr
otec
te
d
VolatileGlobalCellCache
<
VolatileIntArray
>
cache
;
pr
iva
te
VolatileGlobalCellCache
<
VolatileIntArray
>
cache
;
public
CatmaidImageLoader
()
public
CatmaidImageLoader
()
{
{
...
@@ -77,11 +80,19 @@ public class CatmaidImageLoader extends AbstractViewerImgLoader< ARGBType, Volat
...
@@ -77,11 +80,19 @@ public class CatmaidImageLoader extends AbstractViewerImgLoader< ARGBType, Volat
mipmapResolutions
=
new
double
[
numScales
][];
mipmapResolutions
=
new
double
[
numScales
][];
imageDimensions
=
new
long
[
numScales
][];
imageDimensions
=
new
long
[
numScales
][];
blockDimensions
=
new
int
[
numScales
][];
blockDimensions
=
new
int
[
numScales
][];
mipmapTransforms
=
new
AffineTransform3D
[
numScales
];
for
(
int
l
=
0
;
l
<
numScales
;
++
l
)
for
(
int
l
=
0
;
l
<
numScales
;
++
l
)
{
{
mipmapResolutions
[
l
]
=
new
double
[]
{
1
<<
l
,
1
<<
l
,
1
};
mipmapResolutions
[
l
]
=
new
double
[]
{
1
<<
l
,
1
<<
l
,
1
};
imageDimensions
[
l
]
=
new
long
[]
{
width
>>
l
,
height
>>
l
,
depth
};
imageDimensions
[
l
]
=
new
long
[]
{
width
>>
l
,
height
>>
l
,
depth
};
blockDimensions
[
l
]
=
new
int
[]
{
tileWidth
,
tileHeight
,
1
};
blockDimensions
[
l
]
=
new
int
[]
{
tileWidth
,
tileHeight
,
1
};
final
AffineTransform3D
mipmapTransform
=
new
AffineTransform3D
();
mipmapTransform
.
set
(
mipmapResolutions
[
l
][
0
],
0
,
0
);
mipmapTransform
.
set
(
mipmapResolutions
[
l
][
1
],
1
,
1
);
mipmapTransform
.
set
(
0.5
*
(
mipmapResolutions
[
l
][
0
]
-
1
),
0
,
3
);
mipmapTransform
.
set
(
0.5
*
(
mipmapResolutions
[
l
][
0
]
-
1
),
1
,
3
);
mipmapTransforms
[
l
]
=
mipmapTransform
;
}
}
final
int
[]
maxLevels
=
new
int
[]
{
numScales
-
1
};
final
int
[]
maxLevels
=
new
int
[]
{
numScales
-
1
};
...
@@ -150,4 +161,10 @@ public class CatmaidImageLoader extends AbstractViewerImgLoader< ARGBType, Volat
...
@@ -150,4 +161,10 @@ public class CatmaidImageLoader extends AbstractViewerImgLoader< ARGBType, Volat
{
{
return
cache
;
return
cache
;
}
}
@Override
public
AffineTransform3D
[]
getMipmapTransforms
(
int
setup
)
{
return
mipmapTransforms
;
}
}
}
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