21 #include <vtkLinearTransform.h>
22 #include <vtkPolyData.h>
23 #include <vtkSmartPointer.h>
24 #include <vtkTransformPolyDataFilter.h>
26 #include <itksys/SystemTools.hxx>
32 const std::string &description)
45 return vtkSmartPointer<vtkPolyData>();
48 std::string extension = itksys::SystemTools::GetFilenameExtension(baseName);
49 if (!extension.empty())
51 baseName = baseName.substr(0, baseName.size() - extension.size());
54 std::ostringstream ss;
55 ss.imbue(::std::locale::classic());
63 ss << baseName <<
"_S" << std::setprecision(0) << timebounds[0] <<
"_E" << std::setprecision(0) << timebounds[1]
64 <<
"_T" << t << extension;
74 MITK_WARN <<
"Error on write: TimeGeometry invalid of surface " << fileName <<
".";
75 return vtkSmartPointer<vtkPolyData>();
82 transformPolyData->UpdateWholeExtent();
84 vtkSmartPointer<vtkPolyData> polyData = transformPolyData->GetOutput();
92 if (this->
GetInput()->GetTimeGeometry()->CountTimeSteps() > 1)
Class for storing surfaces (vtkPolyData).
itk::FixedArray< ScalarType, 2 > TimeBounds
Standard typedef for time-bounds.
virtual vtkPolyData * GetVtkPolyData(unsigned int t=0) const
DataCollection - Class to facilitate loading/accessing structured data.
vtkSmartPointer< vtkPolyData > GetPolyData(unsigned int t, std::string &fileName)
const mitk::TimeGeometry * GetTimeGeometry() const
Return the TimeGeometry of the data as const pointer.
The CustomMimeType class represents a custom mime-type which may be registered as a service object...
virtual TimeBounds GetTimeBounds() const =0
Get the time bounds (in ms)
virtual const BaseData * GetInput() const override
Get the input data set via SetInput().
virtual ConfidenceLevel GetWriterConfidenceLevel() const override
SurfaceVtkIO(const std::string &baseDataType, const CustomMimeType &mimeType, const std::string &description)
virtual std::string GetOutputLocation() const override
Get the current output location.
ConfidenceLevel
A confidence level describing the confidence of the reader or writer in handling the given data...
virtual ConfidenceLevel GetWriterConfidenceLevel() const override
vtkLinearTransform * GetVtkTransform() const
Get the m_IndexToWorldTransform as a vtkLinearTransform.
mitk::BaseGeometry * GetGeometry(int t=0) const
Return the geometry, which is a TimeGeometry, of the data as non-const pointer.
Abstract class for implementing a reader and writer.
virtual bool IsValidTimeStep(TimeStepType timeStep) const =0
Test for the given time step if a geometry is availible.
BaseGeometry Describes the geometry of a data object.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.