[vtkusers] XCode project?
Mike Jackson
imikejackson at gmail.com
Sun Mar 4 12:55:51 EST 2007
what kind of errors do you have? Compile errors? Linker Errors?
Can you post the output from the build command?
--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services
On Mar 4, 2007, at 5:41 AM, Francesco Pasqualini wrote:
> Hi everyBody,
> I need some help. I'm from Italy (I apologize for my worst english
> in advance)
>
> I reasonably installed VTK & ITK toolkit from the Terminal Utility
> of my MacBook.
> I need this toolkit for an university course, so I try to compile
> in XCode an example that out teacher gave us.
> this example was made in C++ for Visual studio suite that are in
> the university labs. I try to compile using Xcode->new project ->
> command line utility -> C++ tools that may use a Gcc compiler.
> I have 30 errors and I do not understand anything else!!!!
>
> Are there some tutorial, guide, stepByStep, XCode&Kitware4Dummies
> ecc... resource on the web you think can help me?!
>
>
> thanks a lot
> Francesco Pasqualini
>
> ps: this is the code, consider that I've got errors in the include
> part!!!!
> //INCLUDE
> #include "itkImage.h"
> #include "itkImageFileReader.h"
> #include "itkImageFileWriter.h"
> #include "itkThresholdImageFilter.h"
> #include "itkImageToVTKImageFilter.h"
> #include "vtkPolyDataMapper.h"
> #include "vtkActor.h"
> #include "vtkRenderer.h"
> #include "vtkRenderWindow.h"
> #include "vtkRenderWindowInteractor.h"
> #include "vtkInteractorStyleTrackballCamera.h"
> #include "vtkImageGaussianSmooth.h"
> #include "vtkContourFilter.h"
> #include "vtkPolyDataNormals.h"
>
> void main( int argc, char *argv[] )
> {
> //DEFINIZIONE DEI TIPI ITK
> typedef unsigned char PixelType;
> const unsigned int Dimension = 3;
> typedef itk::Image< PixelType, Dimension > ImageType;
>
> typedef itk::ThresholdImageFilter< ImageType > FilterType;
> typedef itk::ImageFileReader< ImageType > ReaderType;
> typedef itk::ImageToVTKImageFilter<ImageType> ConnectorType;
>
> //CREO I FILTRI
> ReaderType::Pointer reader = ReaderType::New();
> FilterType::Pointer filter = FilterType::New();
> ConnectorType::Pointer connector = ConnectorType::New();
> vtkPolyDataMapper *volumeMapper = vtkPolyDataMapper::New();
> vtkActor *volumeActor = vtkActor::New();
> vtkRenderer *render = vtkRenderer::New();
> vtkRenderWindow *renWin = vtkRenderWindow::New();
> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
> vtkInteractorStyleTrackballCamera *style =
> vtkInteractorStyleTrackballCamera::New();
> vtkImageGaussianSmooth *smooth = vtkImageGaussianSmooth::New();
> vtkContourFilter *isoSurface = vtkContourFilter::New();
> vtkPolyDataNormals *normals = vtkPolyDataNormals::New();
>
> //IMPOSTO I PARAMETRI DEI FILTRI
> filter->SetOutsideValue( 0 );
> filter->ThresholdOutside(110, 255);
> volumeMapper->SetScalarRange(0,255);
> render->SetBackground( 0.1, 0.2, 0.4 );
> iren->SetInteractorStyle(style);
> isoSurface->SetValue(0,90);
>
> //COLLEGO LA PIPELINE
> reader->SetFileName( "Nuclei.vtk" );
> filter->SetInput( reader->GetOutput() );
> connector->SetInput( filter->GetOutput() );
> smooth->SetInput(connector->GetOutput() );
> isoSurface->SetInput(smooth->GetOutput() );
> normals->SetInput( isoSurface->GetOutput() );
> volumeMapper->SetInput( normals->GetOutput() );
> volumeActor->SetMapper( volumeMapper );
> render->AddActor( volumeActor );
> renWin->AddRenderer( render );
> iren->SetRenderWindow(renWin);
>
> //VISUALIZZO LA FINESTRA
> iren->Initialize();
> iren->Start();
>
> //ELIMINO I FILTRI CREATI
> smooth->Delete();
> isoSurface->Delete();
> normals->Delete();
> volumeMapper->Delete();
> volumeActor->Delete();
> render->Delete();
> renWin->Delete();
> style->Delete();
> iren->Delete();
> }
>
>
>
>
>
>
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070304/ad80930d/attachment.htm>
More information about the vtkusers
mailing list