#include "vtkImageDataGeometryFilter.h"
#include "vtkWarpScalar.h"
#include "vtkDICOMImageReader.h"
#include "vtkImageData.h"
#include "vtkRenderWindow.h"
#include "vtkRenderer.h"
#include "vtkPolyDataMapper.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkSmartPointer.h"
#include "vtkActor.h"
int main(int, char *[])
{
vtkSmartPointer<vtkDICOMImageReader> dicomReader = vtkSmartPointer<vtkDICOMImageReader>::New();
vtkSmartPointer<vtkImageData> imageData = vtkSmartPointer<vtkImageData>::New();
dicomReader->SetFileName("D:\\Ducments\\VS2008\\FrameClickColor -1\\CT.1.2.840.113619.2.108.3994723703.8049.1137556649.531.dcm");
dicomReader->Update();
imageData = dicomReader->GetOutput();
vtkSmartPointer<vtkImageDataGeometryFilter> filter = vtkSmartPointer<vtkImageDataGeometryFilter>::New();
filter->SetInput(imageData);
vtkSmartPointer<vtkWarpScalar> rape = vtkSmartPointer<vtkWarpScalar>::New();
rape->SetInput(filter->GetOutput());
rape->SetScaleFactor(0.5);
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
mapper->SetInput(rape->GetPolyDataOutput());
mapper->SetScalarRange(imageData->GetScalarRange());
actor->SetMapper(mapper);
vtkSmartPointer<vtkRenderWindow> rewin = vtkSmartPointer<vtkRenderWindow>::New();
vtkSmartPointer<vtkRenderer> render = vtkSmartPointer<vtkRenderer>::New();
vtkSmartPointer<vtkRenderWindowInteractor> iren = vtkSmartPointer<vtkRenderWindowInteractor>::New();
rewin->AddRenderer(render);
render->AddActor(actor);
iren->SetRenderWindow(rewin);
iren->Initialize();
iren->Start();
}