Skip to content

Commit f17a058

Browse files
authored
Merge branch 'master' into dependabot/pip/jinja2-3.1.6
2 parents 596fcfd + 5b961f7 commit f17a058

File tree

245 files changed

+13434
-334483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+13434
-334483
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ cmake_minimum_required(VERSION 3.20)
44
# SHAPEWORKS VERSION
55
###########################################
66
SET(SHAPEWORKS_MAJOR_VERSION 6 CACHE INTERNAL "Major version number" FORCE)
7-
SET(SHAPEWORKS_MINOR_VERSION 6 CACHE INTERNAL "Minor version number" FORCE)
7+
SET(SHAPEWORKS_MINOR_VERSION 7 CACHE INTERNAL "Minor version number" FORCE)
88
SET(SHAPEWORKS_PATCH_VERSION 0 CACHE INTERNAL "Patch version number" FORCE)
9-
SET(SHAPEWORKS_VERSION_STRING "6.6.0-dev")
9+
SET(SHAPEWORKS_VERSION_STRING "6.7.0-dev")
1010
SET(SHAPEWORKS_VERSION "${SHAPEWORKS_MAJOR_VERSION}.${SHAPEWORKS_MINOR_VERSION}.${SHAPEWORKS_PATCH_VERSION}")
1111

1212
# First, check that files were checked out properly using git-lfs
1313
file(MD5 "${CMAKE_CURRENT_SOURCE_DIR}/Testing/data/icp_baseline.nrrd" HASH)
1414
if (NOT "${HASH}" STREQUAL "bb94438a695c749b264180019abbbb97")
15-
message( FATAL_ERROR "MD5 hash of '${CMAKE_CURRENT_SOURCE_DIR}/Testing/data/icp_baseline.nrrd' is incorrect. This most likely means that git-lfs was not installed when ShapeWorks was cloned." )
15+
message( FATAL_ERROR "MD5 hash of '${CMAKE_CURRENT_SOURCE_DIR}/Testing/data/icp_baseline.nrrd' is incorrect. This most likely means that git-lfs was not installed when ShapeWorks was cloned. If you have downloaded a zip or tar.gz of the source, then it will be missing Git-LFS objects. Please use git to clone ShapeWorks or download a source archive containing the Git-LFS objects under releases." )
1616
endif()
1717

1818
set(CMAKE_CXX_STANDARD 17) # available options are [98, 11, 14, 17. 20]

Examples/Python/Data/ellipsoid-v0.zip

Lines changed: 0 additions & 3 deletions
This file was deleted.

Examples/Python/Data/ellipsoid_05.vtk

Lines changed: 0 additions & 3 deletions
This file was deleted.

Examples/Python/Data/ellipsoid_07.vtk

Lines changed: 0 additions & 3 deletions
This file was deleted.

Examples/Python/Data/ellipsoid_1mode.zip

Lines changed: 0 additions & 3 deletions
This file was deleted.

Examples/Python/Data/ellipsoid_fd-v0.zip

Lines changed: 0 additions & 3 deletions
This file was deleted.

Examples/Python/Data/seg.ellipsoid_14.nrrd

Lines changed: 0 additions & 3 deletions
This file was deleted.

Examples/Python/Data/seg.ellipsoid_17.nrrd

Lines changed: 0 additions & 3 deletions
This file was deleted.

Examples/Python/Data/seg.ellipsoid_19.nrrd

Lines changed: 0 additions & 3 deletions
This file was deleted.

Examples/Python/ellipsoid_multiple_domain.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ def Run_Pipeline(args):
4040
else:
4141
dataset_name = "ellipsoid_multiple_domain"
4242
sw.download_dataset(dataset_name, output_directory)
43-
dataset_name = "ellipsoid_joint_rotation"
44-
file_list = sorted(glob.glob(output_directory +
45-
dataset_name + "/segmentations/*.nrrd"))
43+
file_list = sorted(glob.glob(output_directory + "/segmentations/*.nrrd"))
4644

4745
if args.use_subsample:
4846
inputImages =[sw.Image(filename) for filename in file_list]
@@ -152,6 +150,10 @@ def Run_Pipeline(args):
152150
reference = [domain1_reference,domain2_reference]
153151
ref_name = [domain1_ref_name,domain2_ref_name]
154152

153+
# Create a combined mesh for the global alignment
154+
combined_reference = domain1_reference.toMesh(0.5)
155+
combined_reference += domain2_reference.toMesh(0.5)
156+
155157
"""
156158
Grooming Step 3: Rigid alignment
157159
Now we can loop over all of the segmentations again to find the rigid
@@ -172,6 +174,15 @@ def Run_Pipeline(args):
172174
reference[d], iso_value, icp_iterations)
173175
rigid_transform = sw.utils.getVTKtransform(rigidTransform)
174176
transforms.append(rigid_transform)
177+
178+
combined_mesh = shape_seg_list[i*domains_per_shape+d].toMesh(0.5)
179+
for d in range(domains_per_shape):
180+
# skip the first domain
181+
if d == 0:
182+
continue
183+
combined_mesh += shape_seg_list[i*domains_per_shape+d].toMesh(0.5)
184+
transform = combined_mesh.createTransform(combined_reference, sw.Mesh.AlignmentType.Rigid, 100)
185+
transforms.append(transform)
175186

176187
"""
177188
Grooming Step 4: Converting segmentations to smooth signed distance transforms.
@@ -225,8 +236,9 @@ def Run_Pipeline(args):
225236
for d in range(domains_per_shape):
226237
rel_seg_files += sw.utils.get_relative_paths([os.getcwd() + '/' + file_list[i*domains_per_shape+d]], project_location)
227238
rel_groom_files += sw.utils.get_relative_paths([os.getcwd() + '/' + dt_files[i*domains_per_shape+d]], project_location)
228-
transform.append(transforms[i*domains_per_shape+d].flatten())
229-
239+
transform.append(transforms[i*(domains_per_shape+1)+d].flatten())
240+
# add the global alignment transform
241+
transform.append(transforms[i*(domains_per_shape+1)].flatten())
230242
subject.set_groomed_transforms(transform)
231243
subject.set_groomed_filenames(rel_groom_files)
232244
subject.set_original_filenames(rel_seg_files)

0 commit comments

Comments
 (0)