How To : Clipping Plane Animation For Volumes

I will be doing a full How To article on this, but as a quick response to a request, I thought I would do this short post that just covers the basics.

We recently added a number of new features to P3D, one of which was the <property_animation> tag that allows you to control, amongst other things, the location of clipping planes of volumetric datasets over time.

Below is an example slide, where the position of the X and Z clipping planes are set and the Y clipping planes are animated using yMin and yMax values. To enable the values set in the <property> tag to be applied, you also need to include an appropriate reference within the <volume> tag, which in this case is region="$xMin $yMin $zMin $xMax $yMax $zMax". Time is set using the  <key_frame time="0.0"> tags and you can have as many as you need.

<slide>
    <layer>
        <property_animation>
        <key_frame time="0.0">
                 <property name="xMin" type="float">0.0</property>
                 <property name="yMin" type="float">0.75</property>
                 <property name="zMin" type="float">0.4</property>
                 <property name="xMax" type="float">1.0</property>
                 <property name="yMax" type="float">1.0</property>
                <property name="zMax" type="float">1.0</property>
        </key_frame>
                
      <key_frame time="100.0">
                 <property name="xMin" type="float">0.0</property>
                 <property name="yMin" type="float">0.25</property>
                 <property name="zMin" type="float">0.4</property>
                 <property name="xMax" type="float">1.0</property>
                 <property name="yMax" type="float">0.57</property>
                 <property name="zMax" type="float">1.0</property>
       </key_frame>
                      
  </property_animation>
  
<volume  
sampleDensityWhenMoving="0.005" 
sampleDensity="0.0009" 
technique="default" 
position="0.5 0.8 0.1"  
colourSpaceOperation="REPLACE_ALPHA_WITH_LUMINANCE"
scale_x="1.67" 
scale_y="1.67"  
scale_z="2.2"  
alpha="0.7" 
cutoff="0.2"
region="$xMin $yMin $zMin $xMax $yMax $zMax"
rotate="0 1 0 0"
rotate2="180 0 1 0"
rotate3="0 0 0 1"
rotation="0 0 0 1"
>volumes/sample_volume/*.jpg</volume>
</layer>
</slide>

 

Oh, this example slide also shows how to work with non-dicom volumes by using  

colourSpaceOperation="REPLACE_ALPHA_WITH_LUMINANCE"

 

to allow normal interaction using the a key and /*.jpg  to load your files, changing .jpg to suit your file type.

I will cover using volume animation along with image capture as a way to create interactive image sequences in another post.

 

 

 

 

 

 

Like: 
No votes yet