Thanks very much for your help, Utkarsh.<br>The "OpenGLVolumeTextureMapper3D" works right now. <br>Just for future reference, here are instructions to make a volume mapper available in paraview:<br>1. open the rendering.xml file at the "/$Paraveiw-Source-Directory/Servers/ServerManager/<div class="Wj3C7c">
Resources" directory.<br>2. copy the SourceProxy definition of "FixedPointVolumeRayCastMapper", paste it after the definition and made the following changes: (the bold ones are the places where I made changes )<br>
<SourceProxy name="<b>OpenGLVolumeTextureMapper3D</b>"<br> class="<b>vtkOpenGLVolumeTextureMapper3D</b>"><br> <InputProperty<br> name="Input"<br> command="SetInputConnection"><br>
<DataTypeDomain name="input_type"><br> <DataType value="vtkImageData"/><br> </DataTypeDomain><br> </InputProperty><br> <StringVectorProperty<br>
name="SelectScalarArray"<br> command="SelectScalarArray"<br> number_of_elements="1"<br> animateable="0"><br> <ArrayListDomain name="array_list" attribute_type="Scalars"><br>
<RequiredProperties><br> <Property name="Input" function="Input"/><br> </RequiredProperties><br> </ArrayListDomain><br> </StringVectorProperty><br>
<IntVectorProperty<br> name="ScalarMode"<br> command="SetScalarMode"<br> default_values="3"<br> number_of_elements="1"<br> animateable="0"><br>
<EnumerationDomain name="enum"><br> <Entry value="0" text="Default"/><br> <Entry value="1" text="PointData"/><br> <Entry value="2" text="CellData"/><br>
<Entry value="3" text="PointFieldData"/><br> <Entry value="4" text="CellFieldData"/><br> </EnumerationDomain><br> </IntVectorProperty><br>
<IntVectorProperty<br> name="LockSampleDistanceToInputSpacing"<br> command="SetLockSampleDistanceToInputSpacing"<br> default_values="1"<br> number_of_elements="1"<br>
animateable="0"><br> <BooleanDomain name="bool" /><br> </IntVectorProperty><br> <!-- End of FixedPointVolumeRayCastMapper --><br> </SourceProxy><br>
3. find the SubProxy of VolumeFixedPointRayCastMapper, make the following change (bold):<br><SubProxy><br> <Proxy name="VolumeFixedPointRayCastMapper"<br> proxygroup="mappers"<br>
proxyname="<b>OpenGLVolumeTextureMapper3D</b>"><br> </Proxy><br> <ExposedProperties><br> <Property name="LockSampleDistanceToInputSpacing" /><br> </ExposedProperties><br>
</SubProxy><br>4. find the header file of vtkOpenGLVolumeTextureMapper3D at the "/$Paraveiw-Source-Directory/VTK/VolumeRendering/" directory.<br>add "<b>vtkSetClampMacro( LockSampleDistanceToInputSpacing, int, 0, 1 );</b>" as public method,<br>
add "<b>int LockSampleDistanceToInputSpacing;</b>" as a protected variable.<br>5. compile your program and go. <br><br>I understand that "vtkOpenGLVolumeTextureMapper3D" mapper doesn't need a property of "LockSampleDistanceToInputSpacing", but this is the fastest way for me to make the mapper works. <br>
</div>Any clue about how to get rid of the variable?<br>Thanks again for all the helps!<br><br>Biao<br><br><div class="gmail_quote">On Thu, Feb 19, 2009 at 2:35 PM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">No, unless you changed the name for the subproxy which is the "name"<br>
in <SubProxy><Proxy name=".." /></SubProxy>. I'll leave that as is so<br>
the vtkSMUniformGridVolumeRepresentationProxy will just work.<br>
<div><div></div><div class="Wj3C7c"><br>
On Thu, Feb 19, 2009 at 4:33 PM, Biao She <<a href="mailto:shebiao@gmail.com">shebiao@gmail.com</a>> wrote:<br>
> Sorry, please ignore the first question. I know what you mean right now.<br>
> But, please look at the second question:<br>
> "Also, I notice that in the vtkSMUniformGridVolumeRepresen<br>
> tationProxy.cxx file (Servers/ServerManager/), between line 100~117, there<br>
> are some code specifically related to VolumeFixedPointRayCastMapper, do I<br>
> need to change these codes too?"<br>
><br>
> Thanks,<br>
><br>
> Biao<br>
><br>
> On Thu, Feb 19, 2009 at 2:27 PM, Biao She <<a href="mailto:shebiao@gmail.com">shebiao@gmail.com</a>> wrote:<br>
>><br>
>> I didn't add a new proxy definition for "OpenGLVolumeTextureMapper3D".<br>
>> Instead, I change the definition for "VolumeFixedPointRayCastMapper" to<br>
>> something like that:<br>
>> <SubProxy><br>
>> <Proxy name="VolumeFixedPointRayCastMapper"<br>
>> proxygroup="mappers"<br>
>> proxyname="OpenGLVolumeTextureMapper3D"><br>
>> </Proxy><br>
>> </SubProxy><br>
>> It didn't work.<br>
>> By now, I have tried to add a new proxy definition for<br>
>> "OpenGLVolumeTextureMapper3D", but I got the same error message. The<br>
>> following is the XML proxy I wrote:<br>
>> <SubProxy><br>
>> <Proxy name="VolumeOpenGLTexture3DMapper"<br>
>> proxygroup="mappers"<br>
>> proxyname="OpenGLVolumeTextureMapper3D"><br>
>> </Proxy><br>
>> <ExposedProperties><br>
>> <Property name="SampleDistance" /><br>
>> </ExposedProperties><br>
>> </SubProxy><br>
>> I am wondering if I understand you incorrect.<br>
>> Also, I notice that in the vtkSMUniformGridVolumeRepresentationProxy.cxx<br>
>> file (Servers/ServerManager/), between line 100~117, there are some code<br>
>> specifically related to VolumeFixedPointRayCastMapper, do I need to change<br>
>> these codes too?<br>
>><br>
>> Thanks very much for your help.<br>
>><br>
>> Biao<br>
>><br>
>><br>
>><br>
>> On Thu, Feb 19, 2009 at 12:57 PM, Utkarsh Ayachit<br>
>> <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>
>>><br>
>>> Did you add a new proxy definition for the<br>
>>> "OpenGLVolumeTextureMapper3D" proxy? Look at the definition for<br>
>>> "VolumeFixedPointRayCastMapper" (it's further down in the file).<br>
>>> You'll need to add a similar one for the "OpenGLVolumeTextureMapper3D"<br>
>>> proxy.<br>
>>><br>
>>> On Thu, Feb 19, 2009 at 2:55 PM, Biao She <<a href="mailto:shebiao@gmail.com">shebiao@gmail.com</a>> wrote:<br>
>>> > Thanks for your help.<br>
>>> > I have tried to change "FixedPointVolumeRayCastMapper to something<br>
>>> > else" in<br>
>>> > the XML file. However, it still didn't work.<br>
>>> > I am pretty new to these XML files. To the best of my knowledge, I<br>
>>> > changed<br>
>>> > the XML file to:<br>
>>> > <SubProxy><br>
>>> > <Proxy name="VolumeFixedPointRayCastMapper"<br>
>>> > proxygroup="mappers"<br>
>>> > proxyname="OpenGLVolumeTextureMapper3D"><br>
>>> > </Proxy><br>
>>> > </SubProxy><br>
>>> > I simply delete the "ExposedProperties" part for this mapper, because I<br>
>>> > don't know how to decide which property should be exposed.<br>
>>> > After those changes, I opened the iron_protein.vtk data with paraview.<br>
>>> > Here<br>
>>> > is the error message I got:<br>
>>> ><br>
>>> > Unhandled exception at 0x0519e423(vtkPVServerManager.dll) in<br>
>>> > paraview.exe:<br>
>>> > 0xC0000005: Access violation reading location 0x00000000.<br>
>>> ><br>
>>> > Is that because the proxyname is wrong? Or do<br>
>>> > I have to expose some properties?<br>
>>> ><br>
>>> > Biao<br>
>>> ><br>
>>> > On Thu, Feb 19, 2009 at 9:17 AM, Utkarsh Ayachit<br>
>>> > <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>
>>> >><br>
>>> >> The combo-box is only for unstructured volume rendering (and works<br>
>>> >> perfectly fine for that). I believe Biao is taking about image data<br>
>>> >> volume rendering.<br>
>>> >><br>
>>> >> Utkarsh<br>
>>> >><br>
>>> >> On Thu, Feb 19, 2009 at 10:06 AM, pat marion <<a href="mailto:pat.marion@kitware.com">pat.marion@kitware.com</a>><br>
>>> >> wrote:<br>
>>> >> > There is a combo box in the Display tab that allows you to select<br>
>>> >> > the<br>
>>> >> > volume mapper, but it looks like that combo box is not working. I<br>
>>> >> > know it used to work, does anyone know what happened?<br>
>>> >> ><br>
>>> >> > Pat<br>
>>> >> ><br>
>>> >> > On Thu, Feb 19, 2009 at 7:38 AM, Utkarsh Ayachit<br>
>>> >> > <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>
>>> >> >> I know it's kind of hacky, but you can simply edit the XML file and<br>
>>> >> >> change the mapper used. Look at<br>
>>> >> >> Servers/ServerManager/Resources/rendering.xml. In the XML for<br>
>>> >> >> "UniformGridVolumeRepresentation"<br>
>>> >> >> change FixedPointVolumeRayCastMapper to something else. Then after<br>
>>> >> >> the<br>
>>> >> >> definition for FixedPointVolumeRayCastMapper, add a new definition<br>
>>> >> >> for<br>
>>> >> >> the VolumeTextureMapper3D and use that in the<br>
>>> >> >> "UniformGridVolumeRepresentation". I am not sure it's going to work<br>
>>> >> >> out of the box. But work a try.<br>
>>> >> >><br>
>>> >> >> Utkarsh<br>
>>> >> >><br>
>>> >> >> On Wed, Feb 18, 2009 at 6:42 PM, Biao She <<a href="mailto:shebiao@gmail.com">shebiao@gmail.com</a>><br>
>>> >> >> wrote:<br>
>>> >> >>> Hi everyone.<br>
>>> >> >>> I have debugged paraview for days. The reason is that I want to<br>
>>> >> >>> use<br>
>>> >> >>> vtkOpenGLVolumeTextureMapper3d mapper instead of the default<br>
>>> >> >>> volume<br>
>>> >> >>> mapper<br>
>>> >> >>> vtkFixedPointVolumeRayCastMapper in Paraview.<br>
>>> >> >>> Till now, I haven't figured out how to do that. Has anyone done<br>
>>> >> >>> this<br>
>>> >> >>> before?<br>
>>> >> >>> Any hint and help is greatly appreciated.<br>
>>> >> >>> Thanks,<br>
>>> >> >>><br>
>>> >> >>> Aaron<br>
>>> >> >>><br>
>>> >> >>><br>
>>> >> >>><br>
>>> >> >>> _______________________________________________<br>
>>> >> >>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>> >> >>><br>
>>> >> >>> Visit other Kitware open-source projects at<br>
>>> >> >>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>> >> >>><br>
>>> >> >>> Please keep messages on-topic and check the ParaView Wiki at:<br>
>>> >> >>> <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
>>> >> >>><br>
>>> >> >>> Follow this link to subscribe/unsubscribe:<br>
>>> >> >>> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
>>> >> >>><br>
>>> >> >>><br>
>>> >> >> _______________________________________________<br>
>>> >> >> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>> >> >><br>
>>> >> >> Visit other Kitware open-source projects at<br>
>>> >> >> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>> >> >><br>
>>> >> >> Please keep messages on-topic and check the ParaView Wiki at:<br>
>>> >> >> <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
>>> >> >><br>
>>> >> >> Follow this link to subscribe/unsubscribe:<br>
>>> >> >> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
>>> >> >><br>
>>> >> ><br>
>>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> She, Biao<br>
>> Department of Computing Science,<br>
>> University of Alberta, Edmonton, Canada<br>
><br>
><br>
><br>
> --<br>
> She, Biao<br>
> Department of Computing Science,<br>
> University of Alberta, Edmonton, Canada<br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>She, Biao<br>Department of Computing Science,<br>University of Alberta, Edmonton, Canada<br>