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
193495ec
Commit
193495ec
authored
9 years ago
by
Michael Heyde
Browse files
Options
Downloads
Patches
Plain Diff
adapted test
parent
c8d79cfd
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/test/java/bdv/jogl/VolumeRenderer/tests/PreIntegrationSamplerTest.java
+1
-50
1 addition, 50 deletions
.../jogl/VolumeRenderer/tests/PreIntegrationSamplerTest.java
with
1 addition
and
50 deletions
src/test/java/bdv/jogl/VolumeRenderer/tests/PreIntegrationSamplerTest.java
+
1
−
50
View file @
193495ec
...
...
@@ -137,56 +137,7 @@ private FrameBufferRedirector redirector = new FrameBufferRedirector();
return
rgb
;
}
@Test
public
void
shaderLikeExecAlphaCheck
()
{
FloatBuffer
texture
=
objectUnderTest
.
sample
(
testTransferFunction
,
1
);
//linear ramp tf assumed
int
colorDist
=
10
;
int
maxIndex
=
texture
.
capacity
()/
4
-
1
;
float
a
=
getAlpha
(
texture
,
maxIndex
-
colorDist
,
maxIndex
,
1
);
float
b
=
getAlpha
(
texture
,
maxIndex
-
5
*
colorDist
,
maxIndex
-
4
*
colorDist
,
1
);
float
c
=
getAlpha
(
texture
,
maxIndex
-
10
*
colorDist
,
maxIndex
-
9
*
colorDist
,
1
);
assertTrue
(
0
<
getAlpha
(
texture
,
0
,
maxIndex
,
1
));
assertTrue
(
0
<
getAlpha
(
texture
,
maxIndex
/
3
,
maxIndex
,
1
));
assertTrue
(
0
<
getAlpha
(
texture
,
maxIndex
/
2
,
maxIndex
,
1
));
assertTrue
(
0
<
getAlpha
(
texture
,
maxIndex
,
0
,
1
));
assertTrue
(
0
<
getAlpha
(
texture
,
maxIndex
,
maxIndex
/
3
,
1
));
assertTrue
(
0
<
getAlpha
(
texture
,
maxIndex
,
maxIndex
/
2
,
1
));
assertTrue
(
0
<
a
);
assertTrue
(
0
<
b
);
assertTrue
(
0
<
c
);
assertTrue
(
b
<
a
);
assertTrue
(
c
<
b
);
assertTrue
(
getAlpha
(
texture
,
0
,
10
,
100000000
)
>
getAlpha
(
texture
,
0
,
10
,
100
)
);
//big slice through opaque
float
alpha
=
getAlpha
(
texture
,
maxIndex
,
maxIndex
,
1000000
);
assertTrue
(
"Assumed long dist to be near 1 but was "
+
alpha
,
alpha
>
0.9
);
}
@Test
public
void
shaderLikeColorTest
(){
FloatBuffer
texture
=
objectUnderTest
.
sample
(
testTransferFunction
,
1
);
float
[]
a
=
getRGB
(
texture
,
0
,
0
,
100
);
float
[]
b
=
getRGB
(
texture
,
0
,
0
,
1000
);
//very likely blue default of tf
assertTrue
(
a
[
0
]
<
0.1
);
assertTrue
(
a
[
1
]
<
0.1
);
assertTrue
(
a
[
2
]
>
a
[
0
]&&
a
[
2
]
>
a
[
1
]);
//b more blue
assertTrue
(
a
[
2
]<
b
[
2
]);
}
private
void
initTestWindow
(){
testTransferFunction
.
setSampler
(
objectUnderTest
);
dataManager
=
new
VolumeDataManager
(
null
);
...
...
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