[vtkusers] Re: multimiresregistration thanks, vtk!
Christos Panagiotou
C.Panagiotou at cs.ucl.ac.uk
Sun Feb 22 19:25:57 EST 2004
Luis
thanks for your fast reply
paraview reads the .mha file of an example volume from brainweb and
makes a nice visualization - ok till here!
however i would like to be able to visualize through vtk bymyself...
i rewrote the example of the metaImageReader in c++
(http://public.kitware.com/cgi-bin/cvsweb.cgi/~checkout~/VTK/IO/Testing/Tcl/TestMHD.tcl)
and i use the same .mha which i used for paraview
but again i had the sameerror, stating that there is no data to generate
the normals!
i dont know what am i doing wrong! :(
thats the important parts of my code - i just tried to keep the options
as simple as possible
(I havent used a vtkLookupTable)
const char *metafname =
"/home/christos/PhD/Data/raw/Brain1Rot/Brain/brainweb1e1a10f20Rot10Tx15.mha";
vtkMetaImageReader *meta = vtkMetaImageReader::New();
meta->SetFileName(metafname);
vtkContourFilter *skinExtractor = vtkContourFilter::New();
skinExtractor->SetInput((vtkDataSet *)meta->GetOutput());
skinExtractor->SetValue(0, 255);
skinExtractor->ComputeNormalsOff();
skinExtractor->ComputeGradientsOff();
/*
vtkPolyDataNormals *skinNormals = vtkPolyDataNormals::New();
skinNormals->SetInput(skinExtractor->GetOutput());
skinNormals->SetFeatureAngle(60.0);
*/
vtkPolyDataMapper *skinMapper = vtkPolyDataMapper::New();
skinMapper->SetInput(skinExtractor->GetOutput());
skinMapper->ScalarVisibilityOn();
skinMapper->SetScalarModeToUsePointFieldData();
and then i render it...
i would be greatful for some help!
thanks
christos
More information about the vtkusers
mailing list