- Timestamp:
- Jan 12, 2012, 2:35:17 PM (13 years ago)
- Location:
- trunk/packages/vizservers/vtkvis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/RpCutplane.cpp
r2760 r2761 231 231 } 232 232 #else 233 vtkSmartPointer<vtkGaussianSplatter> splatter = vtkSmartPointer<vtkGaussianSplatter>::New(); 234 splatter->SetInput(pd); 233 if (_splatter == NULL) { 234 _splatter = vtkSmartPointer<vtkGaussianSplatter>::New(); 235 } 236 _splatter->SetInput(pd); 235 237 int dims[3]; 236 splatter->GetSampleDimensions(dims);238 _splatter->GetSampleDimensions(dims); 237 239 TRACE("Sample dims: %d %d %d", dims[0], dims[1], dims[2]); 238 240 if (plane == PLANE_ZY) { … … 243 245 dims[2] = 3; 244 246 } 245 splatter->SetSampleDimensions(dims);247 _splatter->SetSampleDimensions(dims); 246 248 for (int i = 0; i < 3; i++) { 247 _cutter[i]->SetInputConnection( splatter->GetOutputPort());249 _cutter[i]->SetInputConnection(_splatter->GetOutputPort()); 248 250 vtkSmartPointer<vtkDataSetSurfaceFilter> gf = vtkSmartPointer<vtkDataSetSurfaceFilter>::New(); 249 251 gf->UseStripsOn(); … … 267 269 } 268 270 #else 269 vtkSmartPointer<vtkGaussianSplatter> splatter = vtkSmartPointer<vtkGaussianSplatter>::New(); 270 splatter->SetInput(pd); 271 if (_splatter == NULL) { 272 _splatter = vtkSmartPointer<vtkGaussianSplatter>::New(); 273 } 274 _splatter->SetInput(pd); 271 275 int dims[3]; 272 276 dims[0] = dims[1] = dims[2] = 64; 273 277 TRACE("Generating volume with dims (%d,%d,%d) from point cloud", 274 278 dims[0], dims[1], dims[2]); 275 splatter->SetSampleDimensions(dims);279 _splatter->SetSampleDimensions(dims); 276 280 for (int i = 0; i < 3; i++) { 277 _cutter[i]->SetInputConnection( splatter->GetOutputPort());281 _cutter[i]->SetInputConnection(_splatter->GetOutputPort()); 278 282 vtkSmartPointer<vtkDataSetSurfaceFilter> gf = vtkSmartPointer<vtkDataSetSurfaceFilter>::New(); 279 283 gf->UseStripsOn(); … … 527 531 } 528 532 529 if (name != NULL && strlen(name) > 0) { 533 if (_splatter != NULL) { 534 for (int i = 0; i < 3; i++) { 535 _mapper[i]->SelectColorArray("SplatterValues"); 536 } 537 } else if (name != NULL && strlen(name) > 0) { 530 538 for (int i = 0; i < 3; i++) { 531 539 _mapper[i]->SelectColorArray(name); -
trunk/packages/vizservers/vtkvis/RpCutplane.h
r2760 r2761 17 17 #include <vtkPlane.h> 18 18 #include <vtkOutlineFilter.h> 19 #include <vtkGaussianSplatter.h> 19 20 20 21 #include "ColorMap.h" … … 108 109 vtkSmartPointer<vtkPlane> _cutPlane[3]; 109 110 vtkSmartPointer<vtkOutlineFilter> _outlineFilter[3]; 111 vtkSmartPointer<vtkGaussianSplatter> _splatter; 110 112 }; 111 113
Note: See TracChangeset
for help on using the changeset viewer.