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
7bd0bb47
Commit
7bd0bb47
authored
9 years ago
by
Michael Heyde
Browse files
Options
Downloads
Patches
Plain Diff
added correct disances for gradient and hessian evaluation on cpu
parent
c3fec1bd
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/jogl/VolumeRenderer/utils/VolumeDataUtils.java
+28
-1
28 additions, 1 deletion
...n/java/bdv/jogl/VolumeRenderer/utils/VolumeDataUtils.java
with
28 additions
and
1 deletion
src/main/java/bdv/jogl/VolumeRenderer/utils/VolumeDataUtils.java
+
28
−
1
View file @
7bd0bb47
...
...
@@ -526,11 +526,38 @@ public class VolumeDataUtils {
return
v1
+
m
*
minStep
;
}
public
static
float
[]
getScaledVolumeDimensions
(
VolumeDataBlock
data
){
float
transferPoints
[][]
=
{{
0
,
0
,
0
,
1
},{
1
,
0
,
0
,
1
},{
0
,
1
,
0
,
1
},{
0
,
0
,
1
,
1
}};
float
transferedPoints
[][]
=
new
float
[
4
][
4
];
Matrix4
trans
=
calcScaledVolumeTransformation
(
data
);
//get the transfered border points
for
(
int
i
=
0
;
i
<
transferPoints
.
length
;
i
++){
trans
.
multVec
(
transferPoints
[
i
],
transferedPoints
[
i
]);
//wclip
for
(
int
d
=
0
;
d
<
3
;
d
++){
transferedPoints
[
i
][
d
]
/=
transferedPoints
[
i
][
3
];
}
}
return
new
float
[]{
VectorUtil
.
distVec3
(
transferedPoints
[
0
],
transferedPoints
[
1
]),
VectorUtil
.
distVec3
(
transferedPoints
[
0
],
transferedPoints
[
2
]),
VectorUtil
.
distVec3
(
transferedPoints
[
0
],
transferedPoints
[
3
])
};
}
private
static
float
[]
calculateVoxelDistance
(
VolumeDataBlock
data
)
{
// TODO Auto-generated method stub
// TODO correct dim
float
distances
[]
=
new
float
[]{
1
,
1
,
1
};
float
distances
[]
=
new
float
[]{
1
,
1
,
1
};
float
realDimensions
[]
=
getScaledVolumeDimensions
(
data
);
for
(
int
d
=
0
;
d
<
3
;
d
++){
distances
[
d
]
=
realDimensions
[
d
]/(
float
)
data
.
dimensions
[
d
];
}
return
distances
;
}
}
...
...
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