如何显示表面的时间运动

时间:2022-03-11 11:59:48

I should display the temporal movement of two surfaces in the same video. I decreased opacity of the external surface to better visualize the internal and external surface at the same time.

我应该在同一视频中显示两个表面的时间移动。我降低了外表面的不透明度,以便更好地同时显示内部和外部表面。

When I run the video I don't see the internal surface movement. The external surface has not a good visualisation.

当我运行视频时,我看不到内部表面移动。外表面没有良好的可视化。

load LV.mat
for i = 1:26
   endo_v3  = ones( 3, 758, 26 );
   epi_v3   = ones( 3, 758, 26 );

   endo_v3  = endo_vertices( :, :, i );
   epi_v3   = epi_vertices(  :, :, i );

   figure(2)

   p_epi    = patch( 'Faces', epi_face, 'Vertices', epi_v3' );

   set( p_epi, 'FaceAlpha', .3, 'EdgeColor', [1 1 1], 'EdgeAlpha', 0.5 )
   set( p_epi, 'Facecolor', 'r' )

   p_endo   = patch( 'Faces', endo_face, 'Vertices', endo_v3' );

   set( p_endo,'EdgeColor',[0 0 1])
   set( p_endo,'Facecolor','b')

   axis off
   pause( .001 );
end

Can someone help me to have a better view of my video ?

有人可以帮助我更好地观看我的视频吗?

1 个解决方案

#1


If you add the LV.mat file ( it seems some variables used in the script are or may be stored in it ) it will be possible run your script and "see" the movie.

如果您添加LV.mat文件(似乎脚本中使用的某些变量或者可能存储在其中),则可以运行您的脚本并“查看”该电影。

With respect to the script, the following lines of code:

关于脚本,以下代码行:

endo_v3 = ones( 3, 758, 26);
epi_v3  = ones( 3, 758, 26);

figure(2)

axis off

can be moved outside the loop.

可以移到循环外面。

Also, an interval of "0.001" seconds, seems very short.

此外,“0.001”秒的间隔似乎非常短。

Try also deleting the two patches at the end of each iteration by adding

尝试通过添加删除每次迭代结束时的两个补丁

delete( [p_epi p_endo] );

just after "pause( .001 );"

在“暂停(.001);”之后

A way different approach might be to use the functions "getframe" and "movie": in the documentation page of "getframe" there is a useful example.

一种不同的方法可能是使用函数“getframe”和“movie”:在“getframe”的文档页面中有一个有用的例子。

Hope this helps.

希望这可以帮助。

#1


If you add the LV.mat file ( it seems some variables used in the script are or may be stored in it ) it will be possible run your script and "see" the movie.

如果您添加LV.mat文件(似乎脚本中使用的某些变量或者可能存储在其中),则可以运行您的脚本并“查看”该电影。

With respect to the script, the following lines of code:

关于脚本,以下代码行:

endo_v3 = ones( 3, 758, 26);
epi_v3  = ones( 3, 758, 26);

figure(2)

axis off

can be moved outside the loop.

可以移到循环外面。

Also, an interval of "0.001" seconds, seems very short.

此外,“0.001”秒的间隔似乎非常短。

Try also deleting the two patches at the end of each iteration by adding

尝试通过添加删除每次迭代结束时的两个补丁

delete( [p_epi p_endo] );

just after "pause( .001 );"

在“暂停(.001);”之后

A way different approach might be to use the functions "getframe" and "movie": in the documentation page of "getframe" there is a useful example.

一种不同的方法可能是使用函数“getframe”和“movie”:在“getframe”的文档页面中有一个有用的例子。

Hope this helps.

希望这可以帮助。