From f0d86ae3a27cace7b1c140798ec5db24d7444d2f Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Mon, 25 Jul 2011 10:27:28 +0200 Subject: [PATCH] Add clitkImage2DicomRTStructFilter to convert an image into a dicom-rt-struct --- common/clitkImage2DicomRTStructFilter.h | 64 +++++++++++++++++++++ common/clitkImage2DicomRTStructFilter.txx | 68 +++++++++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 common/clitkImage2DicomRTStructFilter.h create mode 100644 common/clitkImage2DicomRTStructFilter.txx diff --git a/common/clitkImage2DicomRTStructFilter.h b/common/clitkImage2DicomRTStructFilter.h new file mode 100644 index 0000000..749a0be --- /dev/null +++ b/common/clitkImage2DicomRTStructFilter.h @@ -0,0 +1,64 @@ +/*========================================================================= + Program: vv http://www.creatis.insa-lyon.fr/rio/vv + Main authors : XX XX XX + + Authors belongs to: + - University of LYON http://www.universite-lyon.fr/ + - Léon Bérard cancer center http://www.centreleonberard.fr + - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the copyright notices for more information. + + It is distributed under dual licence + - BSD http://www.opensource.org/licenses/bsd-license.php + - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html + + =========================================================================*/ + +#ifndef CLITKIMAGE2DICOMRTSTRUCTFILTER_H +#define CLITKIMAGE2DICOMRTSTRUCTFILTER_H + +// clitk +#include "clitkDicomRT_ROI.h" +#include "clitkImageCommon.h" +#include "clitkFilterBase.h" +#include "clitkDicomRT_StructureSet.h" + +namespace clitk { + + //-------------------------------------------------------------------- + template + class Image2DicomRTStructFilter: public clitk::FilterBase { + + public: + Image2DicomRTStructFilter(); + ~Image2DicomRTStructFilter(); + + typedef itk::Image ImageType; + typedef typename ImageType::Pointer ImagePointer; + typedef typename clitk::DicomRT_StructureSet::Pointer DicomRTStructPointer; + + // Set inputs + itkSetMacro(Input, ImagePointer); + itkGetConstMacro(Input, ImagePointer); + + // Run filter + void Update(); + + // Get output + itkGetConstMacro(DicomRTStruct, DicomRTStructPointer); + + protected: + ImagePointer m_Input; + DicomRTStructPointer m_DicomRTStruct; + }; + //-------------------------------------------------------------------- + +} // end namespace clitk + +#include "clitkImage2DicomRTStructFilter.txx" + +#endif // CLITKIMAGE2DICOMRTSTRUCTFILTER_H + diff --git a/common/clitkImage2DicomRTStructFilter.txx b/common/clitkImage2DicomRTStructFilter.txx new file mode 100644 index 0000000..b4e9212 --- /dev/null +++ b/common/clitkImage2DicomRTStructFilter.txx @@ -0,0 +1,68 @@ +/*========================================================================= + Program: vv http://www.creatis.insa-lyon.fr/rio/vv + Main authors : XX XX XX + + Authors belongs to: + - University of LYON http://www.universite-lyon.fr/ + - Léon Bérard cancer center http://www.centreleonberard.fr + - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the copyright notices for more information. + + It is distributed under dual licence + - BSD http://www.opensource.org/licenses/bsd-license.php + - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html + + =========================================================================*/ + +// std +#include +#include + +// clitk +#include "clitkImage2DicomRTStructFilter.h" +#include "clitkImageCommon.h" + +// vtk +#include +#include +#include +#include +#include +#include +#include +#include + +//-------------------------------------------------------------------- +template +clitk::Image2DicomRTStructFilter::Image2DicomRTStructFilter() +{ + DD("Image2DicomRTStructFilter Const"); +} +//-------------------------------------------------------------------- + + +//-------------------------------------------------------------------- +template +clitk::Image2DicomRTStructFilter::~Image2DicomRTStructFilter() +{ + DD("Image2DicomRTStructFilter Destructor"); +} +//-------------------------------------------------------------------- + + +//-------------------------------------------------------------------- +template +void clitk::Image2DicomRTStructFilter::Update() +{ + DD("Image2DicomRTStructFilter::Update"); + + +} +//-------------------------------------------------------------------- + + + + -- 2.47.1