[vtkusers] color isosurface

yi mu mugjfyi at yahoo.com
Wed Sep 13 22:01:03 EDT 2006


Hi Naim, thank you for your help, but the the example you give is for unstructured data and the data I have is unorganized point data. I am attaching my program and data file for you to review.  I have been stuck here for 2 days, I just couldn't map the color to scalar value. Your help are greatly appreciated!
 
 YM
Naim <naim at electromagneticworks.com> wrote: Hi YM,

I'm using this example:

 // clipping using input scalar data
 vtkClipDataSet* IsoClipper = vtkClipDataSet::New(); 
  IsoClipper->SetInput(m_pMyUnstructuredGrid);
  double value = myValue; // myValue ª [MinValue, MaxValue]
  IsoClipper->GenerateClipScalarsOff(); // OFF
  IsoClipper->SetValue(value);

 vtkDataSetMapper* myMapper = vtkDataSetMapper::New();
  myMapper->SetInputConnection(IsoClipper->GetOutputPort());

 vtkActor* myActor = vtkActor::New();
  myActor->SetMapper(myMapper);

 IsoMapper->SetScalarRange(MinValue, MaxValue);
 IsoMapper->SetLookupTable(myVtkLookupTable);
 IsoMapper->InterpolateScalarsBeforeMappingOn();

 myRenderer->AddViewProp(myActor);

You can use vtkClipPolyData if u are using point data.
 
If you want generate many iso use: vtkContourGrid or vtkContourFilter.

 vtkContourGrid *mycontourGrid = vtkContourGrid::New();
  mycontourGrid->SetInput(m_pMyUnstructuredGrid); ;
  mycontourGrid->GenerateValues(n, MinValue, MaxValue);


Naim Himrane
ElectromagneticWorks inc.



-----Original Message-----
From: vtkusers-bounces+naim=electromagneticworks.com at vtk.org
[mailto:vtkusers-bounces+naim=electromagneticworks.com at vtk.org] On Behalf Of
yi mu
Sent: September 12, 2006 9:41 PM
To: VTK
Subject: [vtkusers] color isosurface

Is there anyone has an example shows how to color an
isosurface generated from point data? I am desperated.
Any help will be appriciated!

YM

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers



 		
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060913/38497d37/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: elm-1.dat
Type: video/mpeg
Size: 130492 bytes
Desc: 3622303245-elm-1.dat
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060913/38497d37/attachment.m1v>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rec4.tcl
Type: text/x-tcl
Size: 1927 bytes
Desc: 2047520204-rec4.tcl
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060913/38497d37/attachment.tcl>


More information about the vtkusers mailing list