-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3059fe7
Showing
175 changed files
with
3,037 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- You may freely edit this file. See commented blocks below for --> | ||
<!-- some examples of how to customize the build. --> | ||
<!-- (If you delete it and reopen the project it will be recreated.) --> | ||
<!-- By default, only the Clean and Build commands use this build script. --> | ||
<!-- Commands such as Run, Debug, and Test only use this build script if --> | ||
<!-- the Compile on Save feature is turned off for the project. --> | ||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> | ||
<!-- in the project's Project Properties dialog box.--> | ||
<project name="Uloha3" default="default" basedir="."> | ||
<description>Builds, tests, and runs the project Uloha3.</description> | ||
<import file="nbproject/build-impl.xml"/> | ||
<!-- | ||
There exist several targets which are by default empty and which can be | ||
used for execution of your tasks. These targets are usually executed | ||
before and after some main targets. They are: | ||
-pre-init: called before initialization of project properties | ||
-post-init: called after initialization of project properties | ||
-pre-compile: called before javac compilation | ||
-post-compile: called after javac compilation | ||
-pre-compile-single: called before javac compilation of single file | ||
-post-compile-single: called after javac compilation of single file | ||
-pre-compile-test: called before javac compilation of JUnit tests | ||
-post-compile-test: called after javac compilation of JUnit tests | ||
-pre-compile-test-single: called before javac compilation of single JUnit test | ||
-post-compile-test-single: called after javac compilation of single JUunit test | ||
-pre-jar: called before JAR building | ||
-post-jar: called after JAR building | ||
-post-clean: called after cleaning build products | ||
(Targets beginning with '-' are not intended to be called on their own.) | ||
Example of inserting an obfuscator after compilation could look like this: | ||
<target name="-post-compile"> | ||
<obfuscate> | ||
<fileset dir="${build.classes.dir}"/> | ||
</obfuscate> | ||
</target> | ||
For list of available properties check the imported | ||
nbproject/build-impl.xml file. | ||
Another way to customize the build is by overriding existing main targets. | ||
The targets of interest are: | ||
-init-macrodef-javac: defines macro for javac compilation | ||
-init-macrodef-junit: defines macro for junit execution | ||
-init-macrodef-debug: defines macro for class debugging | ||
-init-macrodef-java: defines macro for class execution | ||
-do-jar: JAR building | ||
run: execution of project | ||
-javadoc-build: Javadoc generation | ||
test-report: JUnit report generation | ||
An example of overriding the target for project execution could look like this: | ||
<target name="run" depends="Uloha3-impl.jar"> | ||
<exec dir="bin" executable="launcher.exe"> | ||
<arg file="${dist.jar}"/> | ||
</exec> | ||
</target> | ||
Notice that the overridden target depends on the jar target and not only on | ||
the compile target as the regular run target does. Again, for a list of available | ||
properties which you can use, check the target you are overriding in the | ||
nbproject/build-impl.xml file. | ||
--> | ||
</project> |
Empty file.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+2.08 KB
build/classes/viewer/VisualizationPanel$VisualizationMouseInputAdapter.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#version 330 core | ||
|
||
in vec3 vColor; | ||
|
||
layout(location = 0) out vec4 vFragColor; //fragment shader output | ||
|
||
void main() | ||
{ | ||
//return constant colour as shader output | ||
vFragColor = vec4(vColor, 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#version 330 core | ||
|
||
layout(location = 0) in vec3 vVertex; //object space vertex position | ||
|
||
uniform mat4 MVP; //combined modelview projection matrix | ||
|
||
out vec3 vColor; | ||
|
||
void main() | ||
{ | ||
//get clipspace position | ||
vColor = vVertex; | ||
gl_Position = MVP*vec4(vVertex.xyz,1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
#version 330 core | ||
|
||
in vec3 EntryPoint; | ||
in vec2 UV; | ||
|
||
uniform float StepSize; | ||
uniform vec2 ScreenSize; | ||
uniform sampler2D exitPoints; | ||
uniform sampler3D VolumeTex; | ||
uniform sampler1D TransferFunc; | ||
uniform sampler3D gradients; | ||
uniform mat4 V; | ||
uniform mat4 normalMatrix; | ||
|
||
const float specularExp = 128.0; | ||
const float ambientLight = 0.2; | ||
const vec4 lightCol = vec4(0.2, 0.2, 0.2, 1.0); | ||
|
||
vec3 phong(vec3 color, vec3 viewSpaceNormal, vec3 viewSpacePosition); | ||
vec3 shading(vec3 N, vec3 V, vec3 L); | ||
|
||
vec3 light_position_world = vec3 (10.0, -10.0, 10.0); | ||
const vec3 Ls = vec3 (1.0, 1.0, 1.0); | ||
const vec3 Ld = vec3 (1.0, 1.0, 1.0); | ||
const vec3 La = vec3 (0.1, 0.1, 0.1); | ||
|
||
// surface reflectance | ||
const vec3 Ks = vec3 (1.0, 1.0, 1.0); // fully reflect specular light | ||
const vec3 Kd = vec3 (0.1, 0.1, 0.1); // orange diffuse surface reflectance | ||
const vec3 Ka = vec3 (1.0, 1.0, 1.0); // fully reflect ambient light | ||
const float specular_exponent = 100.0; // specular 'power' | ||
|
||
void main() | ||
{ | ||
vec3 exitPoint = texture(exitPoints, gl_FragCoord.st/ScreenSize).xyz; | ||
|
||
// empty space skipping | ||
if (EntryPoint == exitPoint) | ||
discard; | ||
|
||
vec3 dir = (exitPoint - EntryPoint); | ||
float len = length(dir); | ||
vec3 dirN = normalize(dir); | ||
|
||
vec3 deltaDir = dirN * StepSize; | ||
float deltaDirLen = length(deltaDir); | ||
|
||
// jittering | ||
float random = 1* fract(sin(gl_FragCoord.x * 12.9898 + gl_FragCoord.y * 78.233) * 43758.5453); | ||
vec3 voxelCoord = EntryPoint + deltaDir *random;; | ||
|
||
vec4 colorAcum = vec4(0.0); // The dest color | ||
float alphaAcum = 0.0; | ||
|
||
float intensity; | ||
float lengthAcum = 0.0; | ||
vec4 sample; // sample color | ||
vec3 gradient; | ||
|
||
vec4 bgColor = vec4(0.2, 0.2, 0.2, 1.0); | ||
|
||
vec3 viewSpacePosition; | ||
vec3 viewSpaceNormal; | ||
|
||
|
||
for(int i = 0; i < 2000; i++) | ||
{ | ||
intensity = texture(VolumeTex, voxelCoord).x; | ||
gradient = normalize(texture(gradients, voxelCoord).xyz); | ||
sample = texture(TransferFunc, intensity); | ||
|
||
viewSpacePosition = voxelCoord; | ||
viewSpaceNormal = normalize(( normalMatrix* vec4(gradient, 0.0)).xyz); | ||
|
||
if (sample.a > 0.0) { | ||
// correction | ||
sample.a = 1.0 - pow(1.0 - sample.a, StepSize*100.0f); | ||
sample.rbg = phong(sample.rgb, viewSpaceNormal, viewSpacePosition); | ||
|
||
colorAcum.rgb = colorAcum.rbg + (1.0 - colorAcum.a) * sample.rgb * sample.a ; | ||
colorAcum.a = colorAcum.a + (1.0 - colorAcum.a) * sample.a; | ||
} | ||
|
||
voxelCoord += deltaDir; | ||
lengthAcum += deltaDirLen; | ||
|
||
if (lengthAcum >= len ) { | ||
colorAcum.rgb = colorAcum.rgb*colorAcum.a + (1 - colorAcum.a)*bgColor.rgb; | ||
break; | ||
}else if (colorAcum.a > 1.0) { | ||
colorAcum.a = 1.0; | ||
break; | ||
} | ||
} | ||
|
||
gl_FragColor = colorAcum; | ||
} | ||
|
||
vec3 phong(vec3 color, vec3 viewSpaceNormal, vec3 viewSpacePosition) | ||
{ | ||
|
||
// ambient intensity | ||
vec3 Ia = La * Ka; | ||
|
||
// diffuse intensity | ||
vec3 viewSpaceLightPosition = vec3 (V*vec4 (light_position_world, 1.0)); | ||
vec3 normal = normalize(viewSpaceNormal); | ||
vec3 directionToLight = normalize(viewSpaceLightPosition - viewSpacePosition); | ||
vec3 Id = Ld * color * max(0, dot(normal, directionToLight)); | ||
|
||
// specular intensity | ||
vec3 reflection_eye = reflect(-directionToLight, normal); | ||
vec3 surface_to_viewer_eye = normalize(-viewSpacePosition); | ||
float dot_prod_specular = dot (reflection_eye, surface_to_viewer_eye); | ||
dot_prod_specular = max(dot_prod_specular, 0.0); | ||
float specular_factor = pow (dot_prod_specular, specular_exponent); | ||
vec3 Is = Ls * Ks * specular_factor; | ||
|
||
// final colour | ||
return Is + Id + Ia; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#version 330 core | ||
|
||
layout (location = 0) in vec3 vVertex; | ||
|
||
out vec3 EntryPoint; | ||
out vec4 ExitPointCoord; | ||
|
||
uniform mat4 MVP; | ||
|
||
void main() | ||
{ | ||
EntryPoint = vVertex; | ||
gl_Position = MVP * vec4(vVertex,1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[cthead-16bit028.tif] | ||
backuphash=57657 | ||
[cthead-16bit045.tif] | ||
backuphash=39839 | ||
[cthead-16bit059.tif] | ||
backuphash=25380 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
libs.CopyLibs.classpath=\ | ||
${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar | ||
libs.CopyLibs.displayName=CopyLibs Task | ||
libs.CopyLibs.prop-version=2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
X-COMMENT: Main-Class will be added automatically by build | ||
|
Oops, something went wrong.