//--------------------------------------------------------------------
clitk::DicomRT_ROI* clitk::DicomRT_StructureSet::GetROIFromROINumber(int n)
{
- DD("GetROIFromROINumber");
- DD(n);
if (mROIs.find(n) == mROIs.end()) {
std::cerr << "No ROI number " << n << std::endl;
return NULL;
void clitk::DicomRT_StructureSet::Write(const std::string & filename)
{
#if GDCM_MAJOR_VERSION == 2
- DD("DCM RT Writer");
// Assert that the gdcm file is still open (we can write only if it was readed)
if (mFile == NULL) {
//--------------------------------------------------------------------
void clitk::DicomRT_StructureSet::Read(const std::string & filename)
{
- DD(GDCM_MAJOR_VERSION);
- DD(CLITK_USE_SYSTEM_GDCM);
-
#if CLITK_USE_SYSTEM_GDCM == 1
vtkSmartPointer<vtkGDCMPolyDataReader> reader = vtkGDCMPolyDataReader::New();
reader->SetFileName(filename.c_str());
reader->Update();
- // FIXME : check
-
// Get global information
- // FIXME (could be remove with a single access to properties objet.
vtkRTStructSetProperties * p = reader->GetRTStructSetProperties();
mStudyID = p->GetStudyInstanceUID();
mStudyDate = p->GetStructureSetDate();
// Insert in the map
mROIs[roinumber] = roi;
}
+ return;
#endif // END version with system gdcm (vtkGDCMPolyDataReader)
// Open DICOM
#if GDCM_MAJOR_VERSION == 2
+ FATAL("Error : compile vv with itk4 + external gdcm");
// Read gdcm file
mReader = new gdcm::Reader;