[prev in list] [next in list] [prev in thread] [next in thread]
List: vtkusers
Subject: Re: [vtkusers] IMAGE filters perform no filtering at all?
From: <dean.inglis () camris ! ca>
Date: 2004-01-31 22:43:42
Message-ID: 20040131224342.FWVS23238.tomts31-srv.bellnexxia.net () [209 ! 226 ! 175 ! 134]
[Download RAW message or body]
you need to understand the basics of vtk's pipeline mechanism:
vtk_some_image_reader* reader = vtk_some_image_reader::New();
reader->Set_some_properties_about_your_data(); // eg SetDimensions(), \
SetDataOrigin(), SetDataSpacing(), SetDataExtent() etc. \
reader->SetFileName("a_file_name"); reader->Update();
vtk_some_image_filter* filter = vtk_some_image_filter::New();
filter->Set_some_filter_parameters();
filter->SetInput(reader->GetOutput());
filter->Update();
vtk_some_image_writer* writer = vtk_some_image_writer::New();
writer->SetInput(filter->GetOutput());
writer->SetFileName("another_file_name");
writer->Write();
there is generally no need to grab pointers to the
image data: ie. Don't do this:
id->SetDimensions(256,256,0);
id->SetSpacing(0.78,0.78,0);
id->SetOrigin(0,0,0);
id->SetScalarType(VTK_SHORT);
id->SetNumberOfScalarComponents(1);
id->AllocateScalars();
id=pr->GetOutput();
f->SetInput(id);
spend some time looking at .tcl or .cxx examples and tests
in VTK/Imaging
Dean
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic