//--------------------------------------------------------------------
void vvImage::Reset()
{
- for (unsigned int i = 0; i < mVtkImages.size(); i++) {
+ for (unsigned int i = 0; i < mVtkImages.size(); i++)
mVtkImageReslice[i]->GetInput()->Delete();
- mVtkImageReslice[i]->Delete();
- }
mVtkImages.resize(0);
mVtkImageReslice.resize(0);
//--------------------------------------------------------------------
//--------------------------------------------------------------------
-vtkSmartPointer<vtkImageData> vvImage::GetFirstVTKImageData()
+vtkImageData* vvImage::GetFirstVTKImageData()
{
return mVtkImages[0];
}
//--------------------------------------------------------------------
vtkImageData * CopyAndCastToFloatFrom(vtkImageData * input)
{
- vtkSmartPointer<vtkImageData> p = vtkSmartPointer<vtkImageData>::New();
+ vtkImageData * p = vtkImageData::New();
p->SetExtent(input->GetExtent ()); // Only first ! could not be 4D
p->SetScalarTypeToFloat();
p->AllocateScalars();
void SetImage(std::vector<vtkImageData*> images);
void AddImage(vtkImageData* image);
const std::vector<vtkImageData*>& GetVTKImages();
- vtkSmartPointer<vtkImageData> GetFirstVTKImageData();
+ vtkImageData* GetFirstVTKImageData();
int GetNumberOfDimensions() const;
int GetNumberOfSpatialDimensions();
void GetScalarRange(double* range);