X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkImage2DicomRTStructFilter.txx;h=7325b69edfc81fd9bafb3d297ed09b40e51c7092;hb=706d7e2dc69e12b3823cfae2f3be3f903e4d3c80;hp=9ebde04d0c878cd8dac885da978c7e9ea332af67;hpb=fda331d2e185381051133ae7eb17bb935b79a372;p=clitk.git diff --git a/common/clitkImage2DicomRTStructFilter.txx b/common/clitkImage2DicomRTStructFilter.txx index 9ebde04..7325b69 100644 --- a/common/clitkImage2DicomRTStructFilter.txx +++ b/common/clitkImage2DicomRTStructFilter.txx @@ -114,7 +114,6 @@ void clitk::Image2DicomRTStructFilter::Update() std::cout << "Number of structures in the dicom-rt-struct : " << p->GetNumberOfStructureSetROIs() << std::endl; } - // number of additional contours int m = m_InputFilenames.size(); @@ -138,14 +137,14 @@ void clitk::Image2DicomRTStructFilter::Update() roiNames->SetNumberOfValues(numMasks); roiAlgorithms->SetNumberOfValues(numMasks); roiTypes->SetNumberOfValues(numMasks); - + // Convert the image into a mesh std::vector > meshes; std::vector m_ROINames; meshes.resize(m); m_ROINames.resize(m); for(unsigned int i=0; i ImageType; @@ -156,7 +155,7 @@ void clitk::Image2DicomRTStructFilter::Update() GetFilenameName(vtksys::SystemTools::GetFilenameWithoutLastExtension(m_InputFilenames[i])); std::string name = oss.str(); m_ROINames[i] = name; - + // convert to mesh typedef clitk::BinaryImageToMeshFilter BinaryImageToMeshFilterType; typename BinaryImageToMeshFilterType::Pointer convert = BinaryImageToMeshFilterType::New(); @@ -167,7 +166,7 @@ void clitk::Image2DicomRTStructFilter::Update() if (GetVerboseFlag()) { std::cout << "Mesh has " << meshes[i]->GetNumberOfLines() << " lines." << std::endl; } - + /* // debug mesh write FIXME vtkSmartPointer wr = vtkSmartPointer::New(); @@ -177,7 +176,7 @@ void clitk::Image2DicomRTStructFilter::Update() wr->Write(); */ } - + // Copy previous contours for (unsigned int i = 0; i < numMasks-m; ++i) { #if VTK_MAJOR_VERSION <= 5 @@ -191,7 +190,7 @@ void clitk::Image2DicomRTStructFilter::Update() roiAlgorithms->InsertValue(i, theString); theString = reader->GetRTStructSetProperties()->GetStructureSetRTROIInterpretedType(i); roiTypes->InsertValue(i, theString); - } + } // Add new ones for (unsigned int i = numMasks-m; i < numMasks; ++i) { @@ -204,7 +203,7 @@ void clitk::Image2DicomRTStructFilter::Update() roiAlgorithms->InsertValue(i, "CLITK_CREATED"); roiTypes->InsertValue(i, m_ROIType); } - + /* // Visu DEBUG vtkPolyDataMapper *cubeMapper = vtkPolyDataMapper::New();