I pull it from cvs (cvs co -r VTK-5-0). <br><br>As for using the version with Paraview, i'ld love to.. But unfortunately due to a wierd quirk with Cmake/Paraview/Irix we are unable to compile Paraview on Irix due to problems with command lines being too long. Also, no binary version of paraview is offered for Irix anymore via
<a href="http://paraview.org">paraview.org</a> . So I have to run Paraview on Windows, but this VTK work is being done on Irix.<br><br><div><span class="gmail_quote">On 12/28/05, <b class="gmail_sendername">Dominik Szczerba
</b> <<a href="mailto:domi@vision.ee.ethz.ch">domi@vision.ee.ethz.ch</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
where did you get 5.0 from? I dont see it on <a href="http://vtk.org">vtk.org</a><br>then why not try vtk that comes along with paraview?<br>--domi<br><br>Randall Hand wrote:<br>> I don't think these classes exist in the
4.4. Plus alot of stuff has<br>> changed between 4.4 & 5.0 (This isn't CVS head, it's the 5.0 Branch that's<br>> supposed to be pretty stable), that makes it pretty difficult for me to<br>> backport.<br>>
<br>> On 12/28/05, Dominik Szczerba <<a href="mailto:domi@vision.ee.ethz.ch">domi@vision.ee.ethz.ch</a>> wrote:<br>><br>>>Did you try with the "official" 4.4? I often have problems with the CVS
<br>>>version.<br>>>--domi<br>>><br>>>Randall Hand wrote:<br>>><br>>>>I'm attempting to render an unstructured dataset that contains 1 vector<br>>>>field and 7 scalar fields. I want to map Color & Opacity to one of the
<br>>><br>>>1<br>>><br>>>>scalar fields (both to the same one) and volume render it. I can do<br>>><br>>>this in<br>>><br>>>>Paraview easily (screenie attached), but my VTK code returns a blank
<br>>><br>>>black<br>>><br>>>>window everytime. Am I missing something here?<br>>>><br>>>>I'm doing it all offscreen on an SGI Irix box (Onyx340) with the VTK<br>>>>5.0Branch
installed & MangledMesa. The code I'm using is below:<br>>>><br>>>>==============================<br>>>>#include <vtkColorTransferFunction.h ><br>>>>#include <vtkDataSetReader.h
><br>>>>#include <vtkPiecewiseFunction.h><br>>>>#include <vtkUnstructuredGridVolumeRayCastMapper.h><br>>>>#include <vtkUnstructuredGrid.h><br>>>>#include < vtkDataSet.h
><br>>>>#include <vtkRenderWindow.h><br>>>>#include <vtkRenderer.h><br>>>>#include <vtkRenderLargeImage.h><br>>>>#include <vtkPNGWriter.h><br>>>>#include <
vtkVolumeProperty.h><br>>>>#include <vtkDataSetTriangleFilter.h ><br>>>>#include <vtkImagingFactory.h><br>>>>#include <vtkGraphicsFactory.h><br>>>>void main(void) {
<br>>>> vtkGraphicsFactory *factGraphics = vtkGraphicsFactory::New();<br>>>> factGraphics->SetUseMesaClasses(1);<br>>>> factGraphics->SetOffScreenOnlyMode(1);<br>>>> factGraphics->Delete();
<br>>>> vtkImagingFactory *factImage = vtkImagingFactory::New();<br>>>> factImage->SetUseMesaClasses(1);<br>>>> factImage->Delete();<br>>>> vtkDataSetReader *reader = vtkDataSetReader::New();
<br>>>> reader->SetFileName("../VTK/step_127.vtk");<br>>>> reader->ReadAllScalarsOn();<br>>>><br>>>> vtkDataSetTriangleFilter *tri = vtkDataSetTriangleFilter::New();
<br>>>> tri->SetInput(reader->GetOutput());<br>>>><br>>>><br>>>> vtkColorTransferFunction *color = vtkColorTransferFunction::New();<br>>>><br>>>> color->AddRGBPoint(250, 0, 0, 1);
<br>>>> color->AddRGBPoint(450, 1, 0, 0);<br>>>> color->AddRGBPoint(2600, 1, 1, 0);<br>>>> color->AddRGBPoint(5000, 1, 1, 1);<br>>>><br>>>> vtkPiecewiseFunction *opacity = vtkPiecewiseFunction::New();
<br>>>> opacity->AddPoint(250, 0.1);<br>>>> opacity->AddPoint(450, 0.1);<br>>>> opacity->AddPoint(2600, 0.25);<br>>>> opacity->AddPoint(5000, 1.0);<br>>>>
<br>>>> vtkVolumeProperty *volProp = vtkVolumeProperty::New();<br>>>> volProp->SetColor(color);<br>>>> volProp->SetScalarOpacity(opacity);<br>>>> volProp->SetInterpolationTypeToLinear();
<br>>>><br>>>> vtkUnstructuredGridVolumeRayCastMapper *mapper =<br>>>> vtkUnstructuredGridVolumeRayCastMapper::New();<br>>>> mapper->SetScalarModeToUsePointFieldData();
<br>>>> mapper->SelectScalarArray("Temperature");<br>>>> mapper->SetInput(tri->GetOutput());<br>>>><br>>>> vtkVolume *volume = vtkVolume::New();<br>>>> volume->SetMapper(mapper);
<br>>>> volume->SetProperty(volProp);<br>>>> volume->Update();<br>>>> vtkRenderWindow *renWin = vtkRenderWindow::New();<br>>>> vtkRenderer *ren1 = vtkRenderer::New();<br>
>>> renWin->OffScreenRenderingOn();<br>>>> renWin->AddRenderer(ren1);<br>>>><br>>>> ren1->AddVolume(volume);<br>>>> ren1->ResetCamera();<br>>>> renWin->SetSize(1024, 1024);
<br>>>> renWin->Modified();<br>>>><br>>>> vtkRenderLargeImage *w2if = vtkRenderLargeImage::New();<br>>>> w2if->SetInput(ren1);<br>>>> w2if->SetMagnification(1);
<br>>>><br>>>> vtkPNGWriter *png = vtkPNGWriter::New();<br>>>> png->SetInput(w2if->GetOutput());<br>>>> png->SetFileName("output.png");<br>>>> png->Write();
<br>>>>}<br>>>>===============<br>>>><br>>>><br>>>>--<br>>>>Randall Hand<br>>>>Visualization Scientist,<br>>>>ERDC-MSRC Vicksburg, MS<br>>>>Homepage:
<a href="http://www.yeraze.com">http://www.yeraze.com</a><br>>>><br>>>><br>>>><br>>>>------------------------------------------------------------------------<br>>>><br>>>>
<br>>>>------------------------------------------------------------------------<br>>>><br>>>>_______________________________________________<br>>>>This is the private VTK discussion list.
<br>>>>Please keep messages on-topic. Check the FAQ at:<br>>><br>>><a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>>><br>>>>Follow this link to subscribe/unsubscribe:
<br>>>><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>>><br>>>--<br>>>Dominik Szczerba, Dr.<br>>>Computer Vision Lab CH-8092 Zurich
<br>>><a href="http://www.vision.ee.ethz.ch/~domi">http://www.vision.ee.ethz.ch/~domi</a><br>>><br>><br>><br>><br>><br>> --<br>> Randall Hand<br>> Visualization Scientist,<br>> ERDC-MSRC Vicksburg, MS
<br>> Homepage: <a href="http://www.yeraze.com">http://www.yeraze.com</a><br>><br><br>--<br>Dominik Szczerba, Dr.<br>Computer Vision Lab CH-8092 Zurich<br><a href="http://www.vision.ee.ethz.ch/~domi">http://www.vision.ee.ethz.ch/~domi
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Randall Hand<br>Visualization Scientist, <br>ERDC-MSRC Vicksburg, MS<br>Homepage: <a href="http://www.yeraze.com">http://www.yeraze.com</a>