Hi, I tried to do what you talked about, because I need isotropic volumes for a number of algorithms. I think it is the same for you, right?
I wrote an xml file that you can load in the plugin manager menu, according to this wiki page: http://paraview.org/Wiki/Plugin_HowTo#Enabling_a_filter_in_VTK The problem is that the VTK filter seems not to be paraview-compliant: it didn't work, but unfortunately I didn't have time to describe the bugs. I joint the xml file, so that you can try and please tell me if it works for you -then I may guess it is because of my settings...-. In a nutshell, here are my problems for a volume of spacing 0.5x0.5x1 that I want to be 0.5x0.5x0.5 ie magnification factor = 0.5 on axis z (= 2) - The filter updates, but the extent does not change in the output - When representation of input is 'Slice', the output dimensionality is 2 !!! I hope someone could find the mistake, wherever it comes (my xml, paraview, or VTK) I also write a Cxx class that inherites from vtkImageResample and computes automatically the magnification factor depending on a user-chosen reference axis (in my example, x or y). Today, I use an independent executable that converts an input mhd file into an isotropic volume, and then I open it in paraview. I would be glad if this step is part of a paraview pipeline, but my inherited class has the same behaviour than vtkImageResample (and I think that when I tried with the parent class vtkImageReslice, the same problem occured...). Jerome 2009/1/30 Bryn Lloyd <bll...@vision.ee.ethz.ch>: > Dear VTK Developers > > > I would like to use the vtkResampleImage class in Paraview (plugin). For > this purpose it would be helpful if in addition to the methods > > SetAxisMagnificationFactor (int axis, double factor) > SetAxisOutputSpacing (int axis, double spacing) > > > which are valid for axis 0,1 and 2, following new functions could be added: > > SetAxisMagnificationFactor (double, double, double) > SetAxisOutputSpacing (double, double, double) > > > i.e. taking values for all three axis directions simultaneously. > > > Could this be done? > > > Thanks in advance! > > Bryn > > > > > -- > ------------------------------------------------- > Bryn Lloyd > Computer Vision Laboratory > ETH Zürich, Sternwartstrasse 7 > CH - 8092 Zürich, Switzerland > Tel: +41 44 63 26668 > Fax: +41 44 63 21199 > ------------------------------------------------- > _______________________________________________ > ParaView mailing list > ParaView@paraview.org > http://www.paraview.org/mailman/listinfo/paraview >
<ServerManagerConfiguration> <ProxyGroup name="filters"> <SourceProxy name="ImageResample" class="vtkImageResample" label="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> <Documentation> </Documentation> </InputProperty> <StringVectorProperty name="AxisMagnificationFactor" command="SetAxisMagnificationFactor" number_of_elements="2" element_types="0 1" animateable="0"> <Documentation> </Documentation> </StringVectorProperty> <IntVectorProperty name="Dimensionality" command="SetDimensionality" number_of_elements="1" default_values="3" animateable="0"> <Documentation> </Documentation> </IntVectorProperty> </SourceProxy> <!--End ImageResample--> </ProxyGroup> </ServerManagerConfiguration>
_______________________________________________ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview