From: David Sarrut Date: Mon, 25 Jul 2011 07:36:25 +0000 (+0200) Subject: Rename clitkDicomRT_ROI_ConvertToImageFilter into clitkDicomRTStruct2ImageFilter X-Git-Tag: v1.3.0~272 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=1717ab8852c9f77367e46eed770cb2f189cb6ee1;p=clitk.git Rename clitkDicomRT_ROI_ConvertToImageFilter into clitkDicomRTStruct2ImageFilter --- diff --git a/common/clitkDicomRT_ROI_ConvertToImageFilter.cxx b/common/clitkDicomRTStruct2ImageFilter.cxx similarity index 87% rename from common/clitkDicomRT_ROI_ConvertToImageFilter.cxx rename to common/clitkDicomRTStruct2ImageFilter.cxx index e3b3472..1541cb2 100644 --- a/common/clitkDicomRT_ROI_ConvertToImageFilter.cxx +++ b/common/clitkDicomRTStruct2ImageFilter.cxx @@ -21,7 +21,7 @@ #include // clitk -#include "clitkDicomRT_ROI_ConvertToImageFilter.h" +#include "clitkDicomRTStruct2ImageFilter.h" #include "clitkImageCommon.h" // vtk @@ -33,7 +33,7 @@ //-------------------------------------------------------------------- -clitk::DicomRT_ROI_ConvertToImageFilter::DicomRT_ROI_ConvertToImageFilter() +clitk::DicomRTStruct2ImageFilter::DicomRTStruct2ImageFilter() { mROI = NULL; mWriteOutput = false; @@ -43,19 +43,19 @@ clitk::DicomRT_ROI_ConvertToImageFilter::DicomRT_ROI_ConvertToImageFilter() //-------------------------------------------------------------------- -clitk::DicomRT_ROI_ConvertToImageFilter::~DicomRT_ROI_ConvertToImageFilter() +clitk::DicomRTStruct2ImageFilter::~DicomRTStruct2ImageFilter() { } //-------------------------------------------------------------------- -bool clitk::DicomRT_ROI_ConvertToImageFilter::ImageInfoIsSet() const +bool clitk::DicomRTStruct2ImageFilter::ImageInfoIsSet() const { return mSize.size() && mSpacing.size() && mOrigin.size(); } //-------------------------------------------------------------------- -void clitk::DicomRT_ROI_ConvertToImageFilter::SetROI(clitk::DicomRT_ROI * roi) +void clitk::DicomRTStruct2ImageFilter::SetROI(clitk::DicomRT_ROI * roi) { mROI = roi; } @@ -63,7 +63,7 @@ void clitk::DicomRT_ROI_ConvertToImageFilter::SetROI(clitk::DicomRT_ROI * roi) //-------------------------------------------------------------------- -void clitk::DicomRT_ROI_ConvertToImageFilter::SetCropMaskEnabled(bool b) +void clitk::DicomRTStruct2ImageFilter::SetCropMaskEnabled(bool b) { mCropMask = b; } @@ -71,7 +71,7 @@ void clitk::DicomRT_ROI_ConvertToImageFilter::SetCropMaskEnabled(bool b) //-------------------------------------------------------------------- -void clitk::DicomRT_ROI_ConvertToImageFilter::SetOutputImageFilename(std::string s) +void clitk::DicomRTStruct2ImageFilter::SetOutputImageFilename(std::string s) { mOutputFilename = s; mWriteOutput = true; @@ -80,7 +80,7 @@ void clitk::DicomRT_ROI_ConvertToImageFilter::SetOutputImageFilename(std::string //-------------------------------------------------------------------- -void clitk::DicomRT_ROI_ConvertToImageFilter::SetImageFilename(std::string f) +void clitk::DicomRTStruct2ImageFilter::SetImageFilename(std::string f) { itk::ImageIOBase::Pointer header = clitk::readImageHeader(f); if (header->GetNumberOfDimensions() < 3) { @@ -101,23 +101,23 @@ void clitk::DicomRT_ROI_ConvertToImageFilter::SetImageFilename(std::string f) } //-------------------------------------------------------------------- -void clitk::DicomRT_ROI_ConvertToImageFilter::SetOutputOrigin(const double* origin) +void clitk::DicomRTStruct2ImageFilter::SetOutputOrigin(const double* origin) { std::copy(origin,origin+3,std::back_inserter(mOrigin)); } //-------------------------------------------------------------------- -void clitk::DicomRT_ROI_ConvertToImageFilter::SetOutputSpacing(const double* spacing) +void clitk::DicomRTStruct2ImageFilter::SetOutputSpacing(const double* spacing) { std::copy(spacing,spacing+3,std::back_inserter(mSpacing)); } //-------------------------------------------------------------------- -void clitk::DicomRT_ROI_ConvertToImageFilter::SetOutputSize(const unsigned long* size) +void clitk::DicomRTStruct2ImageFilter::SetOutputSize(const unsigned long* size) { std::copy(size,size+3,std::back_inserter(mSize)); } //-------------------------------------------------------------------- -void clitk::DicomRT_ROI_ConvertToImageFilter::Update() +void clitk::DicomRTStruct2ImageFilter::Update() { if (!mROI) { std::cerr << "Error. No ROI set, please use SetROI." << std::endl; @@ -221,7 +221,7 @@ void clitk::DicomRT_ROI_ConvertToImageFilter::Update() //-------------------------------------------------------------------- -vtkImageData * clitk::DicomRT_ROI_ConvertToImageFilter::GetOutput() +vtkImageData * clitk::DicomRTStruct2ImageFilter::GetOutput() { assert(mBinaryImage); return mBinaryImage; diff --git a/common/clitkDicomRT_ROI_ConvertToImageFilter.h b/common/clitkDicomRTStruct2ImageFilter.h similarity index 89% rename from common/clitkDicomRT_ROI_ConvertToImageFilter.h rename to common/clitkDicomRTStruct2ImageFilter.h index cb06933..1add60e 100644 --- a/common/clitkDicomRT_ROI_ConvertToImageFilter.h +++ b/common/clitkDicomRTStruct2ImageFilter.h @@ -17,8 +17,8 @@ =========================================================================*/ -#ifndef CLITKDICOMRT_ROI_CONVERTTOIMAGEFILTER_H -#define CLITKDICOMRT_ROI_CONVERTTOIMAGEFILTER_H +#ifndef CLITKDICOMRTSTRUCT2IMAGEFILTER_H +#define CLITKDICOMRT_TRUCT2IMAGEFILTER_H #include "clitkDicomRT_ROI.h" #include "clitkImageCommon.h" @@ -29,11 +29,11 @@ namespace clitk { //-------------------------------------------------------------------- - class DicomRT_ROI_ConvertToImageFilter { + class DicomRTStruct2ImageFilter { public: - DicomRT_ROI_ConvertToImageFilter(); - ~DicomRT_ROI_ConvertToImageFilter(); + DicomRTStruct2ImageFilter(); + ~DicomRTStruct2ImageFilter(); void SetROI(clitk::DicomRT_ROI * roi); ///This is used to create a mask with the same characteristics as an input image @@ -66,7 +66,7 @@ namespace clitk { //-------------------------------------------------------------------- template -typename itk::Image::ConstPointer clitk::DicomRT_ROI_ConvertToImageFilter::GetITKOutput() +typename itk::Image::ConstPointer clitk::DicomRTStruct2ImageFilter::GetITKOutput() { assert(mBinaryImage); typedef itk::Image ConnectorImageType; @@ -77,5 +77,5 @@ typename itk::Image::ConstPointer clitk::DicomRT_ROI_Co return connector->GetOutput(); } //-------------------------------------------------------------------- -#endif // CLITKDICOMRT_ROI_CONVERTTOIMAGEFILTER_H +#endif // CLITKDICOMRT_TRUCT2IMAGEFILTER_H