vtkContourTopogramProjectionFilter release version. Includes check on input data and memory.

This commit is contained in:
2022-02-16 14:24:39 +01:00
parent 2df177740c
commit 7756fafc58
2 changed files with 15 additions and 5 deletions

View File

@ -42,7 +42,7 @@ vtkContourTopogramProjectionFilter::vtkContourTopogramProjectionFilter()
this->dImportOffsetLPS[1] = 0.;
this->dImportOffsetLPS[2] = 0.;
this->dSCD = -1.;
this->dSCD = 0.;
this->m_RefTransform = nullptr;
this->m_Transform = nullptr;
@ -112,11 +112,9 @@ int vtkContourTopogramProjectionFilter::RequestData(
return 1;
}
vtkPoints* PrjPoints = vtkPoints::New();
PrjPoints->SetNumberOfPoints( points->GetNumberOfPoints() );
double pp0[3], pp1[3], pp2[3];
for(vtkIdType ii = 0; ii < points->GetNumberOfPoints() ; ii++){
@ -176,7 +174,6 @@ int vtkContourTopogramProjectionFilter::RequestData(
}
output->SetVerts(cells);
PrjPoints->Delete();
output->Squeeze();

View File

@ -1,3 +1,16 @@
/*=========================================================================
Program: DTR
Module: vtkContourTopogramProjectionFilter.h
Description:
This filter projects polydata points using a topogram transform.
Projection geometry is defined by the input transform matrix.
Reference transform is used to trasnform points back into LPS and
is expect to be the matching projection trasform without correction
offsets and rotations.
gfattori Feb 2022
=========================================================================*/
#ifndef VTKCONTOURTOPOGRAMPROJECTIONFILTER_H
#define VTKCONTOURTOPOGRAMPROJECTIONFILTER_H
@ -49,7 +62,7 @@ private:
vtkTransform *m_RefTransform;
vtkTransform *m_Transform;
vtkSmartPointer<vtkPolyData> m_PrjPoly;
};