11using MedEye3d
2- using HDF5, NIfTI
32# Data downloaded from the following google drive links :
43
54# https://drive.google.com/file/d/1Segr6BC_ma9bKNmM8lzUBaJLQChkAWKA/view?usp=drive_link
@@ -19,37 +18,42 @@ h5NiftiImage = "D:/mingw_installation/home/hurtbadly/Downloads/hdf5.nii.gz"
1918NOTE : only one type of modality at a time in multi-image is supported.
2019"""
2120
21+ # For single image display
22+ medEyeStruct = MedEye3d. SegmentationDisplay. displayImage ([ctNiftiImage]) # singleImageDisplay
23+ # or we can also just passa the path itself
24+ # medEyeStruct = MedEye3d.SegmentationDisplay.displayImage(petNiftiImage) #singleImageDisplay
2225
2326
27+ # For multi image display
2428# medEyeStruct = MedEye3d.SegmentationDisplay.displayImage([[ctNiftiImage], [ctNiftiImage]]) #multi image displays
29+
2530# medEyeStruct = MedEye3d.SegmentationDisplay.displayImage([ctNiftiImage]) #singleImageDisplay
26- # imm, res, line_indices = MedEye3d.ShaderAndVerticiesForSuperVoxels.get_example_sv_to_render()
27- # @info "Slice : 41 , Axis : 3 , Plane : Transversal"
28- # @info imm
29- # @info res
30- # @info line_indices
3131
3232
33- supervoxelDict = MedEye3d. ShadersAndVerticiesForSupervoxels. get_example_sv_to_render (h5File, " tetr_dat" )
33+ # Supervoxels
34+ # For conversion of h5 to nifti
35+ # MedEye3d.ShadersAndVerticiesForSupervoxels.populateNiftiWithH5(ctNiftiImage, h5File, h5NiftiImage)
36+
37+ # for visualization
3438
35- # @info typeof(supervoxel_vertices) #Vector{FLoat32}
36- # @info typeof(supervoxel_indices) #Vector{UInt32}
39+ # supervoxelDict = MedEye3d.ShadersAndVerticiesForSupervoxels.get_example_sv_to_render(h5File, "tetr_dat")
40+ # medEyeStruct = MedEye3d.SegmentationDisplay.displayImage(h5NiftiImage, svVertAndInd=supervoxelDict)
41+
42+ # This is for when we have a ctNiftiImage and we were testing modifying the display data from hdf5 so we sill image and supervoxels
43+ # displayData[1][1:128, 1:128, 1:128] = fb["im"][:, :, :]
3744
38- medEyeStruct = MedEye3d. SegmentationDisplay. displayImage (h5NiftiImage, svVertAndInd= supervoxelDict)
39- # #for SIngle you are strictly only supposed to pass it like : [image_ct, imagep]
4045
41- # displayData = MedEye3d.DisplayDataManag.getDisplayedData(medEyeStruct, [Int32(1)]) #passing the active texture number
4246
47+ # For modification of display data
48+
49+ displayData = MedEye3d. DisplayDataManag. getDisplayedData (medEyeStruct, [Int32 (1 ), Int32 (2 )]) # passing the active texture number
4350
4451# #we need to check if the return type of the displayData is a single Array{Float32,3} or a vector{Array{Float32,3}}
4552# # now in this case we are setting random noise over the manualModif Texture voxel layer, and the manualModif texture defaults to 2 for active number
46- # fb = h5open(h5File, "r")
47-
48- # displayData[1][1:128, 1:128, 1:128] = fb["im"][:, :, :]
49- # # displayData[2][:, :, :] = randn(Float32, size(displayData[2]))
5053
54+ displayData[2 ][:, :, :] = randn (Float32, size (displayData[2 ]))
5155
5256# # @info "look here" typeof(displayData)
53- # MedEye3d.DisplayDataManag.setDisplayedData(medEyeStruct, displayData)
57+ MedEye3d. DisplayDataManag. setDisplayedData (medEyeStruct, displayData)
5458
5559
0 commit comments