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