Skip to content

Commit

Permalink
disabling temporarily voxelization filter with CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
spichardo committed Sep 10, 2024
1 parent 2617acd commit 91e8c63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions BabelBrain/BabelDatasetPreps.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,11 +753,11 @@ def GetSkullMaskFromSimbNIBSSTL(SimbNIBSDir='4007/4007_keep/m2m_4007_keep/',
else:
raise err
else:
with CodeTimer("skull voxelization",unit='s'):
with CodeTimer("cpu skull voxelization",unit='s'):
skull_grid = VoxelizeFilter(skull_mesh,targetResolution=SpatialStep*0.75,GPUBackend=VoxelizeCOMPUTING_BACKEND)
with CodeTimer("brain voxelization",unit='s'):
with CodeTimer("cpu brain voxelization",unit='s'):
csf_grid = VoxelizeFilter(csf_mesh,targetResolution=SpatialStep*0.75,GPUBackend=VoxelizeCOMPUTING_BACKEND)
with CodeTimer("skin voxelization",unit='s'):
with CodeTimer("cpu skin voxelization",unit='s'):
skin_grid = VoxelizeFilter(skin_mesh,targetResolution=SpatialStep*0.75,GPUBackend=VoxelizeCOMPUTING_BACKEND)


Expand Down
3 changes: 2 additions & 1 deletion BabelBrain/CalculateMaskProcess.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def __del__(self):
BinaryClosing.InitBinaryClosing(DeviceName=devicename,GPUBackend=gpu_backend)

DataPreps.InitMedianGPUCallback(MedianFilter.MedianFilter,COMPUTING_BACKEND)
DataPreps.InitVoxelizeGPUCallback(Voxelize.Voxelize,COMPUTING_BACKEND)
if gpu_backend != 'CUDA':
DataPreps.InitVoxelizeGPUCallback(Voxelize.Voxelize,COMPUTING_BACKEND)
DataPreps.InitMappingGPUCallback(MappingFilter.MapFilter,COMPUTING_BACKEND)
DataPreps.InitResampleGPUCallback(Resample.ResampleFromTo,COMPUTING_BACKEND)
DataPreps.InitBinaryClosingGPUCallback(BinaryClosing.BinaryClose,COMPUTING_BACKEND)
Expand Down

0 comments on commit 91e8c63

Please sign in to comment.