Граф коммитов

219 Коммитов

Автор SHA1 Сообщение Дата
Matias Lavik 2d4f9a9630 Fixed issues with compute histogram generation: Divide by actual value range (not always 255) when converting from float to int. Also, set sample count to be min(256, valueRange) to prevent "holes" in datasets that have a value range smaller than 256. 2020-11-06 11:38:52 +01:00
Denis Tribouillois 38b7279ffb Compute Histogram on GPU
NOTE:
- Result seems to be broken for some reason (probably texture format)
- Supports only 8-bit data
2020-10-22 12:45:42 +02:00
Matias Lavik cb4ef481b2
Merge pull request #31 from mlavik1/issue25-dicom-pixelformat
Issue25 DICOM pixel format
2020-10-22 11:23:47 +02:00
Matias Lavik 718e16c3a4 Improved DICOM pixel data reading. Supports for 8bit, 16bit and 32bit values. 2020-10-21 19:16:16 +02:00
Matias Lavik 05903061ea
Merge pull request #29 from MichaelOvens/image_sequence_import
Image sequence import
2020-10-21 12:09:05 +02:00
ovensmr d0c2cd848f removed incorrect .tif support - unity's texture.Load() only supports .png and .jpg 2020-10-21 13:51:56 +08:00
ovensmr 1d4fc2441f image sequence importer with density helper class & density source enum 2020-10-21 13:47:10 +08:00
Matias Lavik b20bc911bf issue25: Hackfix for int16 DICOM pixel data. TODO: Need to make a proper fix before merging into master. 2020-10-08 20:08:00 +02:00
Matias Lavik 6a43f45471
Merge pull request #27 from mlavik1/issue24-dicomfixes
Issue24: Misc dicomfixes
2020-10-08 00:07:57 +02:00
Matias Lavik f9a04c1abf Fixed relative scaling issue with slicing plane. 2020-09-15 08:53:44 +02:00
Matias Lavik bdd81091b1 Cleaned up SliceRenderingShader.shader. Also added manual clamping of data texture coordinates (since Unity doens't seem to support clamp to custom border value). This should fix artifacts when moving the slicing plane object. 2020-09-12 15:55:40 +02:00
Matias Lavik b1a84616c7 Temporary fix for slice renderer not working properly when dataset is scaled.
TODO: Remove the "planeMat" hack and instead use two shaders: one for GUI and one for the actual 3D plane (they can re-use the same code from a .cginc file)
2020-09-01 11:27:06 +02:00
Matias Lavik 02da4ee0fc corrected code comment 2020-08-23 15:47:45 +02:00
Matias Lavik 657ba51b47 #24: Don't fail DICOm import just because of datetime encoding error (we don't use this data anyway). 2020-08-23 15:44:00 +02:00
Matias Lavik ad285e71e3 #24: Scale volume based on DICOM pixel spacing 2020-08-23 15:37:59 +02:00
Matias Lavik b893d8376e
Merge pull request #23 from mlavik1/lighting-improvements
Added lighting setting to DVR shader. Added specular lighting.
2020-07-28 21:14:55 +02:00
Matias Lavik 7b0d571bab
README.md: Replaced Youtube video with a PeerTube video 2020-07-28 21:02:35 +02:00
Matias Lavik 1e0367d400 Added lighting setting to DVR shader. Added specular lighting. 2020-07-27 11:48:42 +02:00
Matias Lavik 8728b0c7fe Added some more comments to the new runtime GUI code. 2020-05-26 20:17:42 +02:00
Matias Lavik 174f2e263b
Merge pull request #20 from mlavik1/runtimegui
Runtime (in-game) GUI
2020-05-26 18:58:23 +01:00
Matias Lavik bd5b40e6fa More runtime GUI: Dataset importer, dataset editor: change visibility window, load TF, rotate object, set render mode 2020-05-26 19:46:40 +02:00
Matias Lavik b187faeeb0 Runtime GUI WIP: OpenFileDialog/OpenDirectoryDialog + runtime GUI. 2020-05-25 19:54:02 +02:00
Matias Lavik c6dcc731a7 Added "remove plane" button to slicing renderer window.
Renamed SlicingPlaneAnyDirection -> CrossSectionPlane.
Added more comments.
2020-05-24 20:42:15 +02:00
Matias Lavik d3a6049884 Optimised histogram texture generation: Calculate the reciprocal once and then multiply by this for each sample value, rather than using the Mathf.InverseLerp function.
Also use GameObject.FindObjectsOfType rather than EditorWindow.GetWindow to find existing windows, since the latter instantiates one.
Added some comments.
2020-05-24 15:27:16 +02:00
Matias Lavik 59fee4cdaf
Merge pull request #19 from mlavik1/volumeserialisation
#18: Serialise volume data
2020-05-24 13:40:09 +01:00
Matias Lavik c5e61078c4 #18: MaterialFactory + made serialised classes inherit from ScriptableObject - if not they get serialised every OnInspectorUpdate (=> terrible performance). The downside of this is that you will not be able to save imported datasets as an asset. 2020-05-24 14:15:06 +02:00
Matias Lavik 9c0254ad54 #18: Serialise volume dataset an transfer function - to make sure it doesn't disappear when entering play mode. 2020-05-24 12:37:41 +02:00
Matias Lavik acc72a4be0 Added a small offset to the boundary check in the Maximum Intensity Project shader code. 2020-05-13 22:13:02 +02:00
Matias Lavik c4286951aa Dupliace material when spawning a dataset (to make sure they don't use the same material) 2020-05-13 21:46:49 +02:00
Matias Lavik a7daad2cbd Added endianness-setting to raw dataset importer 2020-05-13 09:00:54 +02:00
Matias Lavik 5af2d825eb
Update README.md 2020-05-12 20:56:08 +02:00
Matias Lavik 3ef8b4061f Fixed rotation 2020-05-12 16:36:22 +02:00
Matias Lavik 88cc0a543c Misc code cleanup + GUI improvement: THe VolumeRenderedObject inspector now has more settings. The MeshRenderer and MeshFIlter has been moved to a child object, making the GUI less messy. 2020-05-12 16:19:39 +02:00
Matias Lavik 247224b1db Fix for DICOM import failing on missing "slope" or "intercept" elements. Also made it ignore non-DICOM files. 2020-05-12 08:46:34 +02:00
Matias Lavik 1651e8418c
Update README.md
Added contact info. Added some tips for VR performance.
2020-05-11 09:45:43 +02:00
Matias Lavik c4c9c70761 Use Hounsfield Units for DICOM data values. This makes imported DICOM files look better with the default transfer function. Also added a "Value Range" editor window. 2020-05-11 08:31:54 +02:00
Matias Lavik 3ea340b54c
Update README.md 2020-05-10 21:35:37 +02:00
Matias Lavik 7bc11f1c09
Update README.md 2020-05-10 21:09:07 +02:00
Matias Lavik 14ae8ed07a GIF 2020-05-10 21:06:58 +02:00
Matias Lavik 59f480f73d
Update README.md 2020-05-10 21:06:20 +02:00
Matias Lavik ba33a9b2cf Added missing license + screenshots/gifs. 2020-05-10 20:57:52 +02:00
Matias Lavik abd2c3b845 Added missing 3rdparty license. 2020-05-10 20:40:51 +02:00
Matias Lavik 83a462947e Show slider for "visible value range" in VolumeRenderedObject's inspector (when using isosurface rendering mode) 2020-05-10 18:43:41 +02:00
Matias Lavik 311fd7762e
Update README.md 2020-05-10 18:14:09 +02:00
Matias Lavik 6432acac3b
Merge pull request #17 from mlavik1/dicom
#4: Dicom importer
2020-05-10 16:17:02 +01:00
Matias Lavik f65a2f13b4 Set DirectVolumeRenderingMaterial's minVal to 0 (by default) 2020-05-10 17:09:12 +02:00
Matias Lavik d36986c61d Histogram texture now has maximum 1024 samples (=> less memory usage + fixed error or large datasets) 2020-05-10 16:54:27 +02:00
Matias Lavik 105a931fe4 DICOM importer (using the openDicom library) 2020-05-10 15:30:11 +02:00
Matias Lavik fcbf604438 Added some error handling in the RawDatasetImporter: Check that the dimension does not exceed the file size. 2020-05-08 18:33:22 +02:00
Matias Lavik 5b2c0ba6de Fixed a mistake in the dataset importer window: It now shows the correct dimenson names ("X - Y - Z" and not "X - X - X") 2020-05-08 08:39:23 +02:00