X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkDicomRT_StructureSet.cxx;h=a845ef55b97cc6a789a7c63b72bb9ce2a805a091;hb=d55f025b18f68066a52b8f33c2dc6481e82c2580;hp=9fa96b39f2a55c0e25f9b0e97bfd64dca2718a8a;hpb=c234e07e4ef90bb8b08c75ca4f1b3a76055e7859;p=clitk.git diff --git a/common/clitkDicomRT_StructureSet.cxx b/common/clitkDicomRT_StructureSet.cxx index 9fa96b3..a845ef5 100644 --- a/common/clitkDicomRT_StructureSet.cxx +++ b/common/clitkDicomRT_StructureSet.cxx @@ -91,6 +91,14 @@ const std::string & clitk::DicomRT_StructureSet::GetDate() const //-------------------------------------------------------------------- +//-------------------------------------------------------------------- +void clitk::DicomRT_StructureSet::SetTransformMatrix(vtkMatrix4x4* matrix) +{ + mTransformMatrix = matrix; +} +//-------------------------------------------------------------------- + + //-------------------------------------------------------------------- const std::string & clitk::DicomRT_StructureSet::GetTime() const { @@ -231,7 +239,7 @@ void clitk::DicomRT_StructureSet::Print(std::ostream & os) const //-------------------------------------------------------------------- -#if GDCM_MAJOR_VERSION == 2 +#if GDCM_MAJOR_VERSION >= 2 //-------------------------------------------------------------------- int clitk::DicomRT_StructureSet::ReadROINumber(const gdcm::Item & item) { @@ -247,7 +255,7 @@ int clitk::DicomRT_StructureSet::ReadROINumber(const gdcm::Item & item) //-------------------------------------------------------------------- void clitk::DicomRT_StructureSet::Write(const std::string & filename) { -#if GDCM_MAJOR_VERSION == 2 +#if GDCM_MAJOR_VERSION >= 2 // Assert that the gdcm file is still open (we can write only if it was readed) if (mFile == NULL) { @@ -439,6 +447,7 @@ void clitk::DicomRT_StructureSet::Read(const std::string & filename) int nb = i->first;//ReadROINumber(i);//mROIIndex[i]; // Create the roi mROIs[nb] = DicomRT_ROI::New(); + mROIs[nb]->SetTransformMatrix(mTransformMatrix); mROIs[nb]->Read(mMapOfROIInfo[nb], mMapOfROIContours[nb]); } @@ -452,7 +461,7 @@ void clitk::DicomRT_StructureSet::Read(const std::string & filename) bool clitk::DicomRT_StructureSet::IsDicomRTStruct(const std::string & filename) { // Open DICOM -#if GDCM_MAJOR_VERSION == 2 +#if GDCM_MAJOR_VERSION >= 2 // Read gdcm file mReader = new gdcm::Reader; mReader->SetFileName(filename.c_str());