Program: wxMaracas
Module: $RCSfile: wxMaracasMultipleVolumeRendererManager.cxx,v $
Language: C++
- Date: $Date: 2009/07/08 14:22:14 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/07/10 13:18:24 $
+ Version: $Revision: 1.2 $
Copyright: (c) 2002, 2003
License:
#include "wxMaracasMultipleVolumeRendererManager.h"
#include <vtkMetaImageReader.h>
+#include <vtkImageCast.h>
/**
** Start of the manager class
**/
vtkImageData* wxMaracasMultipleVolumeRendererManager::getImageData(std::string filename){
if(filename.compare("")!= 0){
-
vtkMetaImageReader* reader = vtkMetaImageReader::New();
reader->SetFileName(filename.c_str());
reader->Update();
- vtkImageData* img = reader->GetOutput();
+ vtkImageData* img = reader->GetOutput();
+ vtkImageCast* cast = vtkImageCast::New();
+ cast->SetInput(img);
+ cast->SetOutputScalarTypeToUnsignedShort();
+ cast->Update();
//reader->Delete();
- return img;
+ //img->Delete();
+ return cast->GetOutput();
}
return NULL;
}