diff --git a/cmrsim/analytic/encoding/_from_sequence.py b/cmrsim/analytic/encoding/_from_sequence.py index f3679999f3be1d78721c323e73bbdbb1d0983aca..c66df44426805aa180d1182a187e2891958cee38 100644 --- a/cmrsim/analytic/encoding/_from_sequence.py +++ b/cmrsim/analytic/encoding/_from_sequence.py @@ -81,12 +81,13 @@ class GenericEncoding(BaseSampling): _, k_adc, t_adc = seq.calculate_kspace() k_space.append(k_adc.T) timings.append(t_adc) - - # pylint: disable=no-value-for-parameter, unexpected-keyword-arg - k_space = tf.cast(tf.concat(k_space, axis=0), tf.float32) - # pylint: disable=no-value-for-parameter, unexpected-keyword-arg - timings = tf.cast(tf.concat(timings, axis=0), tf.float32) - return cls(name, k_space, timings, absolute_noise_std, k_space_segments, device) + k_space = np.concatenate(k_space, axis=0, dtype=np.float32) + timings = np.concatenate(timings, axis=0, dtype=np.float32) + # # pylint: disable=no-value-for-parameter, unexpected-keyword-arg + # k_space = tf.cast(tf.concat(k_space, axis=0), tf.float32) + # # pylint: disable=no-value-for-parameter, unexpected-keyword-arg + # timings = tf.cast(tf.concat(timings, axis=0), tf.float32) + return cls(name, [k_space, ], [timings, ], absolute_noise_std, k_space_segments, device) def from_pulseq(self): raise NotImplementedError("Pulseq interface not yet implemented") \ No newline at end of file diff --git a/cmrsim/datasets/_cardiac_mesh.py b/cmrsim/datasets/_cardiac_mesh.py index 8cae45e42f9ce42f83e41b032d2a4d47cc09ea35..5721fdf9387d32ff3715442ee00da7e3ff9208a0 100644 --- a/cmrsim/datasets/_cardiac_mesh.py +++ b/cmrsim/datasets/_cardiac_mesh.py @@ -56,7 +56,7 @@ class MeshDataset: # pylint: disable=E1101 deformation_mesh = pyvista.UnstructuredGrid( - {vtk.VTK_TETRA: self.mesh.cell_connectivity.reshape(-1, 4)}, + {vtk.VTK_TETRA: self.mesh.cells.reshape(-1, 5)[:, 1:]}, reference_positions) # Apply transformation for all time steps @@ -200,7 +200,7 @@ class MeshDataset: # pylint: disable=E1101 probing_mesh = pyvista.UnstructuredGrid( - {vtk.VTK_TETRA: self.mesh.cell_connectivity.reshape(-1, 4)}, + {vtk.VTK_TETRA: self.mesh.cells.reshape(-1, 5)[:, 1:]}, reference_positions) probing_mesh = reference_mesh.probe(probing_mesh) for name in field_names: diff --git a/cmrsim/datasets/_flow.py b/cmrsim/datasets/_flow.py index 3cf201414efd4a63149fb69a5ecf61a5774db59e..305da0d6462fce1b4a9b0509c114ba8ad5b48300 100644 --- a/cmrsim/datasets/_flow.py +++ b/cmrsim/datasets/_flow.py @@ -109,20 +109,18 @@ class RefillingFlowDataset(tf.Module): uniformly gridded mesh :return: None """ + self.original_mesh = mesh.copy() image_box = np.max(mesh.points, axis=0) - np.min(mesh.points, axis=0) dims = (image_box / lookup_map_spacing).astype(int) resolution = image_box / dims origin = np.min(mesh.points, axis=0) - uniform_grid = pyvista.ImageData(dimensions=dims, - spacing=resolution, - origin=origin) + uniform_grid = pyvista.ImageData(dimensions=dims, spacing=resolution, origin=origin) self.lookup_map_spacing = lookup_map_spacing - - uniform_grid = uniform_grid.sample(mesh) + uniform_grid = uniform_grid.sample(mesh, mark_blank=False) uniform_grid["in_mesh"] = np.array(uniform_grid["vtkValidPointMask"], dtype=np.float64) self.gridded_mesh = uniform_grid - self.original_mesh = mesh + print("Updated Mesh") # pylint: disable=multiple-statements @@ -172,9 +170,9 @@ class RefillingFlowDataset(tf.Module): resolution = image_box / dims origin = np.min(r_slice, axis=0) gridded_seeding_volume = pyvista.ImageData(dimensions=dims + 1, - spacing=resolution, - origin=origin) - self.gridded_seeding_volume = self.gridded_mesh.probe(gridded_seeding_volume) + spacing=resolution, + origin=origin) + self.gridded_seeding_volume = gridded_seeding_volume.sample(self.gridded_mesh, mark_blank=False) active_indx = np.where(self.gridded_seeding_volume.ptc().cell_data["in_mesh"] > 0.7) active_cell_centers = self.gridded_seeding_volume.cell_centers().ptc().points[active_indx] @@ -251,7 +249,7 @@ class RefillingFlowDataset(tf.Module): # Re-seed particles in un-populated areas with Monte-Carlo rejection: # 1. Estimate current particle density within slice self._estimate_particle_density(residual_particle_pos[in_tolerance]) - sampled_particle_pos = self.gridded_seeding_volume.probe(sampled_particle_pos) + sampled_particle_pos = pyvista.PointSet(sampled_particle_pos).sample(self.gridded_seeding_volume) density = np.array(sampled_particle_pos["density"]) decision_boundaries = density / particle_density # 2. To prevent unintentionally increasing particle density, set the decision boundary @@ -413,4 +411,4 @@ class RefillingFlowDataset(tf.Module): smoothed_histogram = gaussian_filter(residual_histogram / sampling_volume, sigma=sigma, truncate=2.5) self.gridded_mesh.cell_data["density"] = smoothed_histogram.reshape(-1, order="F") - return self.gridded_mesh.probe(self.original_mesh) \ No newline at end of file + return self.original_mesh.sample(self.gridded_mesh) diff --git a/cmrsim/datasets/_regular_grid.py b/cmrsim/datasets/_regular_grid.py index f46073820700aae74683731c9f09fb6a19f2291b..99f035e6fddf433caf688a50266dea2d1047a00b 100644 --- a/cmrsim/datasets/_regular_grid.py +++ b/cmrsim/datasets/_regular_grid.py @@ -103,9 +103,10 @@ class RegularGridDataset: readout_direction) nbins = (field_of_view / spacing).m_as("dimensionless").astype(int) new_slice = pyvista.ImageData(dimensions=nbins, spacing=spacing.m_as("m"), - origin=-field_of_view.m_as("m") / 2) + origin=-field_of_view.m_as("m") / 2) new_slice = new_slice.transform(total_transform, inplace=False) - new_slice = self.mesh.probe(new_slice) + new_slice = new_slice.sample(self.mesh) + # new_slice = self.mesh.probe(new_slice) if in_mps: inv_transform = np.eye(4, 4) @@ -123,7 +124,7 @@ class RegularGridDataset: Assumes that the main magnetic field is pointing in z-direction of the contained mesh. The susceptibility os assumed to be specified as parts per million - (e.g. :math:`\chi_{air} = 0.36ppm`). + (e.g. :math:`\\chi_{air} = 0.36ppm`). The result is store in self.mesh["offres"] and is also returned as Quantity. @@ -163,8 +164,10 @@ class RegularGridDataset: # ft_chi_3d_dual = tf.signal.fft3d(chi_3d + 1j * imaginary_channel) ft_chi_3d_dual = tf.signal.fft3d(chi_3d) # 2) multiplication with the dipole function - dipole_kernel = self._compute_fourier_dipole_kernel(field_of_view, - np.array(ft_chi_3d_dual.shape)) + dipole_kernel = self._compute_fourier_dipole_kernel( + field_of_view, + np.array(ft_chi_3d_dual.shape)) + ft_field_3d = ft_chi_3d_dual * dipole_kernel # 3) inverse FT to spatial domain field_3d_dual = tf.signal.ifft3d(ft_field_3d) @@ -207,7 +210,8 @@ class RegularGridDataset: r_min = np.min(input_mesh.points, axis=0) - padding.m_as("m") / 2 nbins = (Quantity(r_max - r_min, "m") / pixel_spacing.to("m")).m.astype(int) mesh = pyvista.ImageData(dimensions=nbins, spacing=pixel_spacing.m_as("m"), origin=r_min) - mesh = input_mesh.probe(mesh) + mesh = mesh.sample(input_mesh) + # mesh = input_mesh.probe(mesh) return cls(mesh) @classmethod @@ -248,8 +252,9 @@ class RegularGridDataset: shape = np.array(shapes[0][0:3]) origin = - pixel_spacing * shape / 2 + origin_offset - mesh = pyvista.ImageData(dimensions=shape, spacing=pixel_spacing.m_as("m"), - origin=origin.m_as("m")) + mesh = pyvista.ImageData(dimensions=shape, + spacing=pixel_spacing.m_as("m"), + origin=origin.m_as("m")) for name, arr in data.items(): mesh[name] = arr.reshape([shape.prod(), *arr.shape[3:]], order="F") diff --git a/cmrsim/trajectory/_proper_ortho_decomp.py b/cmrsim/trajectory/_proper_ortho_decomp.py index ce771cde5141a56e49faa9142df2dc7fe70dae70..e9be968c1964e8a9c57098a012c3ee15a242afae 100644 --- a/cmrsim/trajectory/_proper_ortho_decomp.py +++ b/cmrsim/trajectory/_proper_ortho_decomp.py @@ -194,7 +194,7 @@ class PODTrajectoryModule(BaseTrajectoryModule): return tf.ensure_shape(data[:, 0, :3], (None, 3)), additional_data - @tf.function(jit_compile=False) + @tf.function(jit_compile=False, reduce_retracing=True) def _evaluate_trajectory(self, t: tf.Tensor) -> tf.Tensor: """Reconstructs the data state at given times t, by evaluating the taylor series of mode-weights and computing the weighted sum. diff --git a/docs/source/conf.py b/docs/source/conf.py index 299aecddd854488a9a9f8a5863f85ced995f3ad6..f3728a7b820042d34ace998b711764360ceac6e8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -177,7 +177,7 @@ nbsphinx_thumbnails = { 'example_gallery/analytic_simulation/3_multiple_coils': '_static/notebook_thumbnails/analytic_multiple_coils.png', 'example_gallery/analytic_simulation/BSSFP_offresonance': '_static/notebook_thumbnails/analytic_static_bssfp.png', 'example_gallery/analytic_simulation/cardiac_dti_with_background': '_static/notebook_thumbnails/analytic_cdti_stylized.png', - 'example_gallery/analytic_simulation/simulate_mrxcat_cmrsim': '_static/notebook_thumbnails/analytic_bssfp.svg', + 'example_gallery/analytic_simulation/slice_profile_weighting': '_static/notebook_thumbnails/analytic_slice_select.png', # Bloch 'example_gallery/bloch_simulation/static_cartesian_SEEPI_shepp': '_static/notebook_thumbnails/static_bloch_epi.svg', 'example_gallery/bloch_simulation/static_cartesian_sGRE_shepp': '_static/notebook_thumbnails/static_bloch_spoiled_gre.svg', diff --git a/notebooks/analytic_simulation/1_basic_functionality.ipynb b/notebooks/analytic_simulation/1_basic_functionality.ipynb index d87822c338dc8da7a52949fcaa17224e7de3e077..b4d0dd1ba7993cb724d608b5a7a300c7a19051d8 100644 --- a/notebooks/analytic_simulation/1_basic_functionality.ipynb +++ b/notebooks/analytic_simulation/1_basic_functionality.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6bf9680412df66ad08a714289785460b5ffa245712d0f966aafdbfae05a5efb8 -size 1219948 +oid sha256:b8d56d63e89341adc9e7ef890e94fa029b7ecc8cee5e87ed3944fef570ee7391 +size 1306438 diff --git a/notebooks/analytic_simulation/2_motion.ipynb b/notebooks/analytic_simulation/2_motion.ipynb index b4c1cfe70dc9044752dc9880731d20c72ad70606..f86ad21458190f622452ab2c47c3e5e92158d46f 100644 --- a/notebooks/analytic_simulation/2_motion.ipynb +++ b/notebooks/analytic_simulation/2_motion.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9f7ffbb659227027875a88243eb395255f03f7c19eeb248d4fa4d38f77990b3a -size 3231222 +oid sha256:c0382e4d5c6832fa6d13c0c45a27c90314291aeeff35082cb0bbd747dc84aedf +size 3150514 diff --git a/notebooks/analytic_simulation/3_multiple_coils.ipynb b/notebooks/analytic_simulation/3_multiple_coils.ipynb index bbd815c4fc739ffa37c8fb3121491d983333d799..0952332118c9b1cfffdfa6f9cae681538d41bc4e 100644 --- a/notebooks/analytic_simulation/3_multiple_coils.ipynb +++ b/notebooks/analytic_simulation/3_multiple_coils.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:daacf2559adad01b78ecf763ec4eaa6962edb47bd454064db07352ef5dc51610 -size 2568841 +oid sha256:277fa0161aa58d7ed2598f215a2355ede6f3977e4ef2695a701d4c55a9045521 +size 4888167 diff --git a/notebooks/analytic_simulation/BSSFP_offresonance.ipynb b/notebooks/analytic_simulation/BSSFP_offresonance.ipynb index cd7b41c50bdaef93b493912fa805de6ca23c3226..96c4f989f993a52154daffc8ceca44d10d98f142 100644 --- a/notebooks/analytic_simulation/BSSFP_offresonance.ipynb +++ b/notebooks/analytic_simulation/BSSFP_offresonance.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb017045678b9a3a2299fa7512712d6d045d67a3edd5158adc6ca6d7cbb57964 -size 539217 +oid sha256:593385a3434d5cfd7ea952c1040b071d3074655c41b22144f71bae35db2e31f1 +size 705165 diff --git a/notebooks/analytic_simulation/slice_profile_weighting.ipynb b/notebooks/analytic_simulation/slice_profile_weighting.ipynb index ee9063571367bee4152bdf4c0d841608dfeaa8fe..fc176bed2939c9c9feb660a1cff1f2ff67e9e9d3 100644 --- a/notebooks/analytic_simulation/slice_profile_weighting.ipynb +++ b/notebooks/analytic_simulation/slice_profile_weighting.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d98481fc96d5498b6863c01f06366c84edf704bb555a610002f485c3132e7426 -size 795512 +oid sha256:ead40d9cec098416e02ae58bdf19c52a0eee73e4c197f1eb9f4b1ff94eece6b8 +size 584225 diff --git a/notebooks/bloch_simulation/flow_bssfp_submodules_aorta.ipynb b/notebooks/bloch_simulation/flow_bssfp_submodules_aorta.ipynb index dfc50486dc774b01490810c886adc1a304798183..048a09b92b7be2ea0c4decfaebb08329bab40406 100644 --- a/notebooks/bloch_simulation/flow_bssfp_submodules_aorta.ipynb +++ b/notebooks/bloch_simulation/flow_bssfp_submodules_aorta.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:608c9bae48c6d237eb6c107244ca57fecefd8b661b35bb08e6ad2876095a3a66 -size 718553 +oid sha256:cfbaf63e9a642a2d3bf56aa84084211d14ce4764c42dce40241d211118a65199 +size 979310 diff --git a/notebooks/bloch_simulation/flow_mvenc_sGRE_ubend_parallel.ipynb b/notebooks/bloch_simulation/flow_mvenc_sGRE_ubend_parallel.ipynb index a0e472c25eaf680975b56fea8f4e7cde025dc072..5e6d5ab47f9f267aa8a0ca9db4064671bda848b0 100644 --- a/notebooks/bloch_simulation/flow_mvenc_sGRE_ubend_parallel.ipynb +++ b/notebooks/bloch_simulation/flow_mvenc_sGRE_ubend_parallel.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ab1685f95db98146fe387453b034078b168a7f3c639b0dcbb0f9032c01c9927 -size 3628975 +oid sha256:6be5d373f0fa1b9b29c1b8cb0c32b3042d8f3e8e0b20390c3a843c1f9d3b3a50 +size 2209619 diff --git a/notebooks/bloch_simulation/flow_venc_sGRE_stenosis_sequential.ipynb b/notebooks/bloch_simulation/flow_venc_sGRE_stenosis_sequential.ipynb index 2da49a6ae474feda0154c5a3fcc70ec2772d4d6e..0ae7f4d72357a7ce9ec2b87f8422cc600579fda8 100644 --- a/notebooks/bloch_simulation/flow_venc_sGRE_stenosis_sequential.ipynb +++ b/notebooks/bloch_simulation/flow_venc_sGRE_stenosis_sequential.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf503ff29ee0534f69a43ba7fe5214b31c9e8d8ea43151b98b52f98cad40698a -size 15541521 +oid sha256:7ab05a78ae8be2ac1310584434b29e0bd46985637f15b4b72188e5a42d1a9923 +size 654582 diff --git a/notebooks/bloch_simulation/flow_venc_sGRE_turbUBend.ipynb b/notebooks/bloch_simulation/flow_venc_sGRE_turbUBend.ipynb index c03839575be4659e5016e6d842334affada11727..cb544a28ddcd5df089e503314beb75c962d7a854 100644 --- a/notebooks/bloch_simulation/flow_venc_sGRE_turbUBend.ipynb +++ b/notebooks/bloch_simulation/flow_venc_sGRE_turbUBend.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b34dfa25b129eeba56c9ce378bb11a98aef853f41ded6ae759a305e28d4de01b -size 7080260 +oid sha256:64fc9ecb3da8ca9cc24a2b8687a26302564b82f606bb84bd6a26e48123a1832a +size 6371687 diff --git a/notebooks/bloch_simulation/movmesh_bssfp.ipynb b/notebooks/bloch_simulation/movmesh_bssfp.ipynb index c68ff5b164cb24627b30f88309ecc45032038484..19be967ce6318e34fa691fc6e8ee7b7b2a782649 100644 --- a/notebooks/bloch_simulation/movmesh_bssfp.ipynb +++ b/notebooks/bloch_simulation/movmesh_bssfp.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97cfc4518fe865454384402b4e822c4516795453c2b54a1f5e8ab1923970d9c1 -size 2666390 +oid sha256:9b8df2c2f6a698a5ce28a06441aacf5c3f93c3e95f723bc57ee8a9381e2aa552 +size 2639915 diff --git a/notebooks/bloch_simulation/movmesh_general_bloch.ipynb b/notebooks/bloch_simulation/movmesh_general_bloch.ipynb index 0612af1bf023cf90fa14c5ad6c1b0da546c2e39d..7ce68ddc07a2ef418b18fd4cfef7374bed4d0feb 100644 --- a/notebooks/bloch_simulation/movmesh_general_bloch.ipynb +++ b/notebooks/bloch_simulation/movmesh_general_bloch.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:26802a84586ba0ce715b160d22f7a8255b625fd8ecbb1d7058cf7e3b67cfb0a2 -size 90998 +oid sha256:eca080b6452d59631ea97068fbcd817c6d3bb6c78d569e6075faabf1fd406c78 +size 90999 diff --git a/notebooks/bloch_simulation/static_BSSFP_offresonance.ipynb b/notebooks/bloch_simulation/static_BSSFP_offresonance.ipynb index ba22b487f8802b918e9fbd6f5d9c144455cf2ce8..9aef2dd23ad9314b681344e8216d80678eeb2b09 100644 --- a/notebooks/bloch_simulation/static_BSSFP_offresonance.ipynb +++ b/notebooks/bloch_simulation/static_BSSFP_offresonance.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b7c61f5259b8763f53cdb4bda406e6d6a298398f10b648218a8c02bc3da2c224 -size 919330 +oid sha256:934f14e79d779801c2857d48973003540c644ec080233d745208c731c0de1e61 +size 1160455 diff --git a/notebooks/bloch_simulation/static_CPMG_t2star.ipynb b/notebooks/bloch_simulation/static_CPMG_t2star.ipynb index dbb388bf88359cf2a254eee480582f1b28098128..4c56401ced0d7c7bcfdd4bd9f6ce845e4ba26b78 100644 --- a/notebooks/bloch_simulation/static_CPMG_t2star.ipynb +++ b/notebooks/bloch_simulation/static_CPMG_t2star.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e6e6100c2e6e9cb049e92d544dc5cc881f2d1b988549476d39980ff5c7cde885 -size 73094 +oid sha256:860ccac3d1f4243c86a7de2d8b05012d4653b579813c0c2b8a0719126d688816 +size 137377 diff --git a/notebooks/bloch_simulation/static_cartesian_SEEPI_shepp.ipynb b/notebooks/bloch_simulation/static_cartesian_SEEPI_shepp.ipynb index cd3e13f89235a3ed9240a4a70d65555939842e3e..d703f11b69334cd08bcada91644ffac1cd6866f9 100644 --- a/notebooks/bloch_simulation/static_cartesian_SEEPI_shepp.ipynb +++ b/notebooks/bloch_simulation/static_cartesian_SEEPI_shepp.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:648096692b220ab320d00779c5e7ee13920aa655818767c450226e9e1b25c24d -size 430074 +oid sha256:06b8f534f078e671955cedf52427dc1428e49a017f3975bccd56cf6ae8561f68 +size 266719 diff --git a/notebooks/bloch_simulation/static_cartesian_sGRE_shepp.ipynb b/notebooks/bloch_simulation/static_cartesian_sGRE_shepp.ipynb index 9e53352ccdfe7855584d4d43e6053bddd5e2c42f..f8229d3124105220d82ae3d32aac499dbce1fa34 100644 --- a/notebooks/bloch_simulation/static_cartesian_sGRE_shepp.ipynb +++ b/notebooks/bloch_simulation/static_cartesian_sGRE_shepp.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:abb2f6223c8451ddefa4ef7a591d5555157f607e74428de730947246842ff18d -size 928969 +oid sha256:e4bd34c845c0e2587e9e962a2217eae2b3c159c3d7e09ca3b726d8e7404814f5 +size 1555249 diff --git a/notebooks/bloch_simulation/static_multi_coil_bssfp.ipynb b/notebooks/bloch_simulation/static_multi_coil_bssfp.ipynb index 8ea2978e0c8ed0d699fca7d1e9f5f97aac97581d..0c32eaf454dc25d22e24758f16aae633a7bf5e99 100644 --- a/notebooks/bloch_simulation/static_multi_coil_bssfp.ipynb +++ b/notebooks/bloch_simulation/static_multi_coil_bssfp.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d025dad54f823dfc15315d916ca2c6b3478c38bc45e3f4d5c008854ec947783c -size 1803176 +oid sha256:c1bcfdc32f75b36340b5e6502918b95d9dbcd32deda2845e3b5f8f6c625311eb +size 1327080 diff --git a/notebooks/datasets/cardiac_mesh_dataset.ipynb b/notebooks/datasets/cardiac_mesh_dataset.ipynb index b7b81384a3931b1fee619b05245d2626de0d6a72..210e4c92919c63e712463df8e40750a32e2fd659 100644 --- a/notebooks/datasets/cardiac_mesh_dataset.ipynb +++ b/notebooks/datasets/cardiac_mesh_dataset.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7253e082a73975d3e7ea6dcdcd9fa607d3504a4abc5dbb29671071f435a195c5 -size 3793044 +oid sha256:051d57400cd087d33ba33b247fe86381a141a45294c1557187d6b39ebf32161d +size 3821399 diff --git a/notebooks/datasets/refilling_flow_dataset.ipynb b/notebooks/datasets/refilling_flow_dataset.ipynb index f8dbfc8875bd5b4d062bb890519b007c31d9d67c..471205cdb171e0489f725df2354c560ea7b6fb75 100644 --- a/notebooks/datasets/refilling_flow_dataset.ipynb +++ b/notebooks/datasets/refilling_flow_dataset.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:996458fb864d8b98c10ab68c3222c062c4d1cf62260d439625973bcf4c94c37d -size 279000 +oid sha256:b7ec7146a560f6ab24dca736b162b2ba868e4b11e7cd9b0285416ccafe4b7467 +size 646135 diff --git a/notebooks/local_functions.py b/notebooks/local_functions.py index d0997809f94a39a51784f3801333c7a468ac0877..c37a4f5b765762ebe5e1581ddb4222f582d47516 100644 --- a/notebooks/local_functions.py +++ b/notebooks/local_functions.py @@ -68,7 +68,7 @@ def create_cylinder_phantom(dimensions=(200, 200, 4), spacing=(0.001, 0.001, 0.0 :return: pyvista.UnstructuredGrid """ - raster = pyvista.UniformGrid(dimensions=dimensions, spacing=spacing, origin=-np.array(dimensions) * np.array(spacing) / 2) + raster = pyvista.ImageData(dimensions=dimensions, spacing=spacing, origin=-np.array(dimensions) * np.array(spacing) / 2) cylinders = [pyvista.Cylinder(center=(*xy_positions[i].m_as("m"), 0.), direction=(0., 0., 1.), radius=radii[i].m_as("m"),) for i in range(len(radii))] max_radius = np.max(np.array(dimensions[0:2]) * np.array(spacing[0:2])) / 2 @@ -110,7 +110,7 @@ def create_spherical_phantom(dimensions=(120, 120, 120), spacing=(0.002, 0.002, :param big_radius: float in meter :return: pyvista.UnstructuredGrid """ - raster = pyvista.UniformGrid(dimensions=dimensions, spacing=spacing, + raster = pyvista.ImageData(dimensions=dimensions, spacing=spacing, origin=-np.array(dimensions) * np.array(spacing) / 2) sphere_big = pyvista.Sphere(radius=big_radius).extract_surface() box = pyvista.Box(bounds=(-big_radius * 0.3, big_radius * 0.3, -big_radius/5, diff --git a/notebooks/trajectory_modules/breathing_motion_module.ipynb b/notebooks/trajectory_modules/breathing_motion_module.ipynb index 6d19d239744cca05e8221fc5d64e8061eb985524..7aa2b420b6bfdde654f0aa2623c68c31cc139a2d 100644 --- a/notebooks/trajectory_modules/breathing_motion_module.ipynb +++ b/notebooks/trajectory_modules/breathing_motion_module.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a3586145ec8e482232ff0d175c210a9403945b1a3b86d6635ca7dcdd7b7c1e03 -size 12980893 +oid sha256:35bf6d74eada1aca889e0a3d5f062a6a0c26f14522a11077d89a7af7a3a99c58 +size 5934834 diff --git a/notebooks/trajectory_modules/cardiac_mesh_pod.ipynb b/notebooks/trajectory_modules/cardiac_mesh_pod.ipynb index 21f3b0b1a415770b28198d056f89f416cd305314..9a8d846238edf53bb5a0364190402b9f0c7c8dca 100644 --- a/notebooks/trajectory_modules/cardiac_mesh_pod.ipynb +++ b/notebooks/trajectory_modules/cardiac_mesh_pod.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84f0141bac2adcefaa3cc53f54a167c5e292f4ace19be013be28ec7824e2c576 -size 18265188 +oid sha256:eb3d7ce0a295a68ddcfbd018c4e423298a75779d0ba0d30909273cdda4fca4ed +size 14088078 diff --git a/notebooks/trajectory_modules/contracting_cardiac_mesh_with_random_disp.ipynb b/notebooks/trajectory_modules/contracting_cardiac_mesh_with_random_disp.ipynb index 67f2601ace3919dca9ecdfc7ff2abb8548918b5f..5a6f830afab5f12b127564bf0a4bb12063bd2af4 100644 --- a/notebooks/trajectory_modules/contracting_cardiac_mesh_with_random_disp.ipynb +++ b/notebooks/trajectory_modules/contracting_cardiac_mesh_with_random_disp.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:254275501dfc8af05decf03bc49f424767e1441f7642dd4f5d667a5132032202 -size 17627048 +oid sha256:573816a73c04364c5783a1302dc431a973b9ff3b5d5077cbcceebb9b1194344d +size 17457606 diff --git a/notebooks/trajectory_modules/flow_trajectory_module.ipynb b/notebooks/trajectory_modules/flow_trajectory_module.ipynb index 2312e92beda4f13fd9beb9c28258b12588b89866..8f0177e40cc20eeb92a46594f645070faf290443 100644 --- a/notebooks/trajectory_modules/flow_trajectory_module.ipynb +++ b/notebooks/trajectory_modules/flow_trajectory_module.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4f8768cd61b257338cc1c779d1ab130a4243c53c18a89a2d957334a0a986ba4 -size 17426126 +oid sha256:514018be341822e8ca3bfd6c4b04bf7838944d67d8875f410d00668bc0ec456e +size 17432232 diff --git a/notebooks/trajectory_modules/taylor_trajectories.ipynb b/notebooks/trajectory_modules/taylor_trajectories.ipynb index 5ae746c2f384db4481bc18b8c5ae15b306abaedd..cebfa4ee14e3be9c3fc926f8263edb2a0ae1c814 100644 --- a/notebooks/trajectory_modules/taylor_trajectories.ipynb +++ b/notebooks/trajectory_modules/taylor_trajectories.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6ce52c5e9cc0845d6bc4c2eff6100f9c96d14e571c16b22d4c5c8eff3c0843bf -size 13255771 +oid sha256:85fc5747d6c50ecf22b65348a9096a7c29404e1dfb679cc094d13d2a8a75e927 +size 6542766 diff --git a/notebooks/trajectory_modules/turbulent_flow.ipynb b/notebooks/trajectory_modules/turbulent_flow.ipynb index 55bf1d2fc13b951600b2112389d2d07aca722424..1ae9f8866719c9ec6d89df829eaacc9a4269e93e 100644 --- a/notebooks/trajectory_modules/turbulent_flow.ipynb +++ b/notebooks/trajectory_modules/turbulent_flow.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7b6b9ab88ef1f9b9269e74fc1802b8dea40a113c595041a939184eb2820b62d9 -size 1423425 +oid sha256:50dd9b7b00419da603048f9325070682b41307d466197ac8cd4513043493b638 +size 1400552