Hi,

I am back with this extent bug.
Reminder: a filter that produces output with larger extent than input has a
weird behaviour.

I attached a ServerManager XML that describes the vtkImageResample filter. With
 this filter, you can choose an output spacing smaller than the input, inducing
  an oversampling of the input image. You can load it in ParaView as a Plugin.

In ParaView, this simple pipeline will reproduce what I call here a bug
(however, I hope that someone will tell me that my XML is soooo bad):

      builtin
          |
    Wavelet1 (Menu Sources -> Wavelet)
          |
ImageResample1 (Menu Filters -> Image Resample )


- Wavelet is set to default values
- Set, in ImageResample, the AxisOutputSpacing property to: 0.5   0.5   0.5
- Apply

Now, take a look at the Information tabs:
- Wavelet1 has an extent of [ -10,10 , -10,10 , -10,10 ] and same bounds.
Normal, spacing is 1
- ImageResample extent ought to be [ -20,20 , -20,20 , -20,20 ] with bounds
[ -10,10 , -10,10 , -10,10 ]. But it is not! Extent is unchanged, but the new
spacing has been takn into account as the bounds are now [ -5,5 , ...]. My
conclusion is that ParaView prevents the output extent to be greater than the
input one (to be convinced, change the AxisOutputSpacing to 2: everything work
well).
Weird additional things: the outline representation is aligned to the input
bounding box (good point: it has to be). But setting representation to slice or
volume throw an error or show the slice with wrong extent/bounds.

I hope that someone will tackle this problem: I thing it is not so rare to have
output extent greater than input extent (oversampling, curved planar
reformation, ...)

see also:
http://www.paraview.org/pipermail/paraview/2009-October/014306.html

Thanks a lot
Jerome
<ServerManagerConfiguration>
   <ProxyGroup name="filters">
      <SourceProxy name="ImageResample"
                   class="vtkImageResample"
                  label="Image Resample">
         <Documentation
                      long_help="" 
                      short_help=""> 
         </Documentation> 
         <InputProperty
                       name="Input"
                       command="SetInputConnection">
            <ProxyGroupDomain name="groups">
               <Group name="sources"/>
               <Group name="filters"/>
            </ProxyGroupDomain>
            <DataTypeDomain name="input_type">
               <DataType value="vtkImageData"/>
            </DataTypeDomain>
         </InputProperty>

        <DoubleVectorProperty
                          name="AxisOutputSpacing"
                           label="AxisOutputSpacing"
                           command="SetAxisOutputSpacing"
                           number_of_elements="3"
                           number_of_elements_per_command="1"
                           use_index="1"
                           repeat_command="1"
                           animateable="1"
                           default_values="1 1 1" >
            <Documentation>
               Choose the component to extract.
            </Documentation>
         </DoubleVectorProperty>
        <DoubleVectorProperty
                          name="AxisMagnificationFactor"
                           label="AxisMagnificationFactor"
                           command="SetAxisMagnificationFactor"
                           number_of_elements="3"
                           number_of_elements_per_command="1"
                           use_index="1"
                           repeat_command="1"
                           animateable="1"
                           default_values="1 1 1" >
            <Documentation>
               Choose the components to extract.
            </Documentation>
         </DoubleVectorProperty>
        <IntVectorProperty
                           name="InterpolationMode"
                           command="SetInterpolationMode"
                           number_of_elements="1"
                           default_values="2"
                           animateable="0">
          <EnumerationDomain name="enum">
            <Entry value="0" text="NearestNeighbor"/>
            <Entry value="1" text="Linear"/>
            <Entry value="2" text="Cubic"/>
          </EnumerationDomain>

          <Documentation>

          </Documentation>
        </IntVectorProperty>
        <IntVectorProperty
                             name="Interpolate"
                             command="SetInterpolate"
                             number_of_elements="1"
                             default_values="1"
                             animateable="0">
          <BooleanDomain name="boolean"/>
          <Documentation>

          </Documentation>
        </IntVectorProperty>        
        <IntVectorProperty
                          name="ReleaseDataFlag"
                          command="SetReleaseDataFlag"
                          number_of_elements="1"
                          default_values="0"
                          animateable="0">
           <BooleanDomain name="boolean"/>
           <Documentation>
              
           </Documentation>
         </IntVectorProperty>
      </SourceProxy>
   </ProxyGroup> 
</ServerManagerConfiguration>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to