18 #include "itkMetaDataDictionary.h"
19 #include "itkMetaDataObject.h"
20 #include "itkNrrdImageIO.h"
21 #include "itkImageFileWriter.h"
22 #include "itkDiffusionTensor3D.h"
49 MITK_ERROR <<
"Sorry, input to NrrdTensorImageWriter is NULL!";
52 if ( this->GetOutputLocation().empty() )
54 MITK_ERROR <<
"Sorry, filename has not been set!" ;
60 io->SetFileType( itk::ImageIOBase::Binary );
61 io->UseCompressionOn();
63 typedef itk::Image<itk::DiffusionTensor3D<float>,3>
ImageType;
64 typedef itk::ImageFileWriter<ImageType> WriterType;
70 nrrdWriter->SetInput( outimage );
71 nrrdWriter->SetImageIO(io);
72 nrrdWriter->SetFileName(this->GetOutputLocation().c_str());
73 nrrdWriter->UseCompressionOn();
79 catch (itk::ExceptionObject e)
81 std::cout << e << std::endl;
itk::SmartPointer< Self > Pointer
virtual ~NrrdTensorImageWriter()
DataCollection - Class to facilitate loading/accessing structured data.
virtual mitk::NrrdTensorImageWriter * Clone() const override
virtual ConfidenceLevel GetConfidenceLevel() const override
The confidence level of the reader or writer implementation.
The CustomMimeType class represents a custom mime-type which may be registered as a service object...
map::core::discrete::Elements< 3 >::InternalImageType ImageType
Convenience class to temporarily change the current locale.
static const char * GetStaticNameOfClass()
void MITKCORE_EXPORT CastToItkImage(const mitk::Image *mitkImage, itk::SmartPointer< ItkOutputImageType > &itkOutputImage)
Cast an mitk::Image to an itk::Image with a specific type.
virtual void Write() override
Write the base data to the specified location or output stream.
us::ServiceRegistration< IFileWriter > RegisterService(us::ModuleContext *context=us::GetModuleContext())
this class encapsulates tensor images
ConfidenceLevel
A confidence level describing the confidence of the reader or writer in handling the given data...
Base class for writing mitk::BaseData objects to files or streams.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.