1 #include <creaImageIOGimmickView.h>
2 #include <creaImageIOSystem.h>
3 #include "boost/filesystem.hpp"
6 #include <gdcmGlobal.h>
7 #include <gdcmSerieHelper.h>
8 #include <gdcmFileHelper.h>
10 #include <vtkGdcmReader.h>
13 #if defined(USE_GDCM2)
14 #include <vtkGDCMImageReader.h>
15 #include "gdcmSystem.h"
16 #include "gdcmCryptographicMessageSyntax.h"
17 #include "gdcmUIDGenerator.h"
18 #include "gdcmAnonymizer.h"
19 #include "gdcmGlobal.h"
23 namespace fs = boost::filesystem;
27 ///Class used to represent the actual state of the image selected and to perform comparisons on its values
31 ImageExtent(const std::string& x, const std::string& y, const std::string& z, const std::string& t)
33 sscanf(x.c_str(),"%d",&mExtent[0]);
34 sscanf(y.c_str(),"%d",&mExtent[1]);
35 sscanf(z.c_str(),"%d",&mExtent[2]);
36 sscanf(t.c_str(),"%d",&mExtent[3]);
37 if(x==""){mExtent[0]=1;}
38 if(y==""){mExtent[1]=1;}
39 if(z==""){mExtent[2]=1;}
40 if(t==""){mExtent[3]=1;}
42 if (mExtent[3]>1) mDim=4;
43 else if (mExtent[2]>1) mDim=3;
44 else if (mExtent[1]>1) mDim=2;
45 else if (mExtent[0]>1) mDim=1;
51 void Clear() { mExtent[0] = mExtent[1] = mExtent[2] = mExtent[3] = 1; }
53 ///Returns true if the two extents are compatible
54 bool IsCompatible( const ImageExtent& );
56 ///Adds the extent passed as a parameter to the current extent
57 void Add ( const ImageExtent& );
59 ///Returns the ieth position of the extent
60 int Get(int i) { return mExtent[i]; }
62 ///Returns the dimension of the current image
63 void SetDimension(int dim) { mDim=dim; }
65 ///Returns the dimension of the current image
66 int GetDimension() { return mDim; }
73 //======================================================================
75 //======================================================================
77 GimmickView::GimmickView(boost::shared_ptr<Gimmick> gimmick, int threads)
81 GimmickDebugMessage(1,"GimmickView::GimmickView"
83 // Anciently started the threads ...
84 // Threads now automatically start at first image request
88 //======================================================================
90 //======================================================================
92 GimmickView::~GimmickView()
94 GimmickDebugMessage(1,"GimmickView::~GimmickView"
97 //======================================================================
99 //======================================================================
100 /// Initializes the view :
101 /// Creates the TreeViews for all the TreeHandler of the Controller
103 void GimmickView::Initialize()
105 mReaderStarted=false;
107 //======================================================================
109 //======================================================================
111 void GimmickView::Finalize()
115 //======================================================================
117 //======================================================================
118 /// Create the tree views
119 void GimmickView::CreateTreeViews()
121 GimmickMessage(2,"Creating the tree views"<<std::endl);
122 Gimmick::TreeHandlerMapType::const_iterator i;
123 for (i = mGimmick->GetTreeHandlerMap().begin();
124 i!= mGimmick->GetTreeHandlerMap().end();
127 this->CreateTreeView(i->second);
131 /// Create a tree view with a given name
132 void GimmickView::CreateSingleTreeView(std::string &i_name)
134 this->CreateTreeView(mGimmick->GetTreeHandlerMap()[i_name]);
139 //======================================================================
141 //======================================================================
142 /// Updates the TreeView of given name from level l to bottom
143 /// (calls the virtual method TreeView::Update())
144 void GimmickView::UpdateTreeViewLevel(const std::string& t, int l)
146 TreeViewMapType::iterator i;
147 i = GetTreeViewMap().find(t);
148 if ( i == GetTreeViewMap().end() )
150 GimmickError("INTERNAL ERROR : GimmickView::UpdateTreeView : '"
151 <<t<<"' is not in TreeViewMap");
153 i->second->UpdateLevel(l);
156 //======================================================================
157 /// Clears the status and begins a new selection process
158 void GimmickView::ResetExtent()
162 mImageExtent.reset();
167 //======================================================================
169 //======================================================================
170 bool ImageExtent::IsCompatible(const ImageExtent& ie)
172 bool compatible=true;
173 ImageExtent * extent= (ImageExtent*)&ie;
174 if((*extent).Get(0)!=Get(0)
175 || (*extent).Get(1)!=Get(1))
182 //======================================================================
184 //======================================================================
185 void ImageExtent::Add(const ImageExtent& ie)
187 ImageExtent * extent= (ImageExtent*)&ie;
188 mExtent[2]+=(*extent).Get(2);
195 //======================================================================
196 /// No selected image
197 bool GimmickView::NoValidateSelected ()
199 GimmickDebugMessage(2,"Validating selected"<<std::endl);
200 std::string mMessage;
201 mMessage="Cannot have 0 images selected!";
203 modifyValidationSignal(valid);
204 SetMessage(mMessage);
208 //======================================================================
209 ///Validates the dimension compliance of the images with the maximum and
210 ///minimum given, and between their sizes
211 bool GimmickView::ValidateSelected (tree::Node* sel, int min_dim, int max_dim)
213 GimmickDebugMessage(2,"Validating selected"<<std::endl);
214 std::string mMessage;
218 mMessage="Cannot have 0 images selected!";
223 boost::shared_ptr<ImageExtent> ie=boost::shared_ptr<ImageExtent>(new ImageExtent((*sel).GetAttribute("D0028_0010"),
224 (*sel).GetAttribute("D0028_0011"),
225 (*sel).GetAttribute("D0028_0012"),
231 if((mImageExtent->Get(min_dim-1)<2)||(mImageExtent->Get(max_dim)>1))
237 std::stringstream out;
238 out << mImageExtent->GetDimension() << "D image " << mImageExtent->Get(0) << "x"<< mImageExtent->Get(1) << "x"<< mImageExtent->Get(2) <<" selected";
239 mMessage = out.str();
240 mImageExtent->SetDimension(2);
246 if(mImageExtent->IsCompatible(*ie))
248 if(mImageExtent->GetDimension()==max_dim && mImageExtent->Get(max_dim)>2)
250 std::stringstream out;
251 out<<"Cannot add this image to selection : would result in a "<<mImageExtent->GetDimension()+1<<"D image!";
257 std::stringstream out;
258 out<<"Selecting "<<mImageExtent->GetDimension()<<"D images is not allowed !";
262 else if(min_dim==3 && (ie->Get(2)+mImageExtent->Get(2))<2)
264 std::stringstream out;
265 out << "Cannot build the selection as it would result in a ";
266 out << mImageExtent->GetDimension();
267 out << "D image, and the minimum is ";
275 mImageExtent->Add(*ie);
276 std::stringstream out;
277 out << mImageExtent->GetDimension() << "D image " << mImageExtent->Get(0) << "x"<< mImageExtent->Get(1) << "x"<< mImageExtent->Get(2) <<" selected";
278 mMessage = out.str();
283 mMessage="The selected images are not compatible.";
289 modifyValidationSignal(valid);
290 SetMessage(mMessage);
294 //======================================================================
295 void GimmickView::modifyValidationSignal(bool ivalid)
298 mValidationSignal(ivalid);
301 void GimmickView::stopReader()
306 //======================================================================
307 ///Reads Images (Non Threaded)
308 void GimmickView::ReadImagesNotThreaded(std::vector<vtkImageData*>& s, std::vector<std::string> im, int dimension)
313 #define GIMMICK_NO_IMAGE_SELECTION 0
314 #define GIMMICK_2D_IMAGE_SELECTION 2
315 #define GIMMICK_3D_IMAGE_SELECTION 3
316 #define GIMMICK_4D_IMAGE_SELECTION 4
323 // Create the output data
326 vtkImageData * out=vtkImageData::New();
327 out->ShallowCopy(mReader.GetImage(im.front()));
330 else if (im.size()>1) // Test inutile ? JPR
332 vtkImageData* first = mReader.GetImage( im.front());
336 std::vector<std::string>::iterator it;
337 for (it=im.begin(); it!=im.end(); ++it)
339 vtkImageData* out = vtkImageData::New();
340 out->ShallowCopy(mReader.GetImage(*it));
347 vtkImageData* out = vtkImageData::New();
348 // out->CopyStructure(first);
349 out->SetScalarType(first->GetScalarType());
350 out->SetNumberOfScalarComponents(first->GetNumberOfScalarComponents());
352 //first->GetExtent(ext); // JPR
353 first->GetWholeExtent(ext); // renvoie egalement 0,0 en Z // JPR
357 ext[5] = im.size()-1;
361 ext[5] = ext[5] * im.size()-1; // to deal with multiframes - JPR
365 // LG : TODO : Z Spacing ?
368 first->GetDimensions(dim);
370 out->SetDimensions(dim[0], dim[1], im.size() );
371 out->AllocateScalars();
374 unsigned long imsize = dim[0] * dim[1];
375 imsize = imsize * dim[2] ; // deal with multiframes // JPR
379 // differents formats char , short, etc...
380 // differents components 1..3 ex. jpg ->RGB 3
381 imsize = imsize * first->GetScalarSize() * first->GetNumberOfScalarComponents();
384 // Order the file name vector
387 first->GetSpacing(spc);
389 // OrderTheFileNameVector is not here anymore.
390 // Try orderFilesWithZSpacing from OutputModel FCY
391 // spc[2]=OrderTheFileNameVector(im);
394 out->SetSpacing(spc);
397 std::vector<std::string>::iterator it;
399 for (it=im.begin(); it!=im.end(); ++it)
401 vtkImageData* cur = mReader.GetImage( (*it) );
402 memcpy(out->GetScalarPointer(0,0,slice), cur->GetScalarPointer(0,0,0), imsize);
412 //======================================================================
416 //////////////////////////////////////////////////////////
417 // Test if the image is a multiple or single frame.
418 // For the moment only with the creation of vtkImageDta.
419 // TO DO with image size and dim!!!
420 //////////////////////////////////////////////////////////
421 bool GimmickView::isSingle(const std::string i_file)
424 vtkImageData* first = mReader.GetImage( i_file);
426 first->GetDimensions(dim);
437 //////////////////////////////////////////////////////////
438 // get Attributes values for a file
439 //////////////////////////////////////////////////////////
441 void GimmickView::getAttributes(const std::string i_file, std::map<std::string, std::string> &o_infos, OutputAttr i_attr)
443 if(i_attr.inside.size() >0)
445 mGimmick->GetAttributes(i_file,o_infos,i_attr);
447 if(i_attr.outside.size()>0)
449 mReader.getAttributes(i_file,o_infos, i_attr.outside);
453 //////////////////////////////////////////////////////////
454 // create an output structure with n entries = n output
455 //////////////////////////////////////////////////////////
456 void GimmickView::readImages1(std::vector<OutStrGimmick>& o_output, std::vector<std::string> im,
459 std::vector<std::string>::iterator it;
460 for (it=im.begin(); it!=im.end(); ++it)
463 out.img = vtkImageData::New();
464 out.img->ShallowCopy(mReader.GetImage(*it));
466 getAttributes((*it),out.infos,i_attr);
467 o_output.push_back(out);
469 // If we want only one output information structure, we set it outside the loop
472 getAttributes(im.front(), o_output.front().infos, i_attr);
477 //////////////////////////////////////////////////////////
478 // create an output structure with n entries = 1 output
479 //////////////////////////////////////////////////////////
480 void GimmickView::readImages3(std::vector<OutStrGimmick>& o_output, std::vector<std::string> im,
481 OutputAttr i_attr, double i_zspc)
484 vtkImageData* first = mReader.GetImage( im.front());
485 out.img = vtkImageData::New();
486 out.img->SetScalarType(first->GetScalarType());
487 out.img->SetNumberOfScalarComponents(first->GetNumberOfScalarComponents());
489 first->GetWholeExtent(ext); // send also 0,0 in Z
492 ext[5] = im.size()-1;
496 ext[5] = ext[5] * im.size()-1; // to deal with multiframes
498 out.img->SetExtent(ext);
501 first->GetDimensions(dim);
502 first->GetSpacing(spac);
503 out.img->SetSpacing(spac);
504 out.img->SetDimensions(dim[0], dim[1], im.size() );
505 out.img->AllocateScalars();
507 unsigned long imsize = dim[0] * dim[1];
508 imsize = imsize * dim[2] ; // deal with multiframes here
509 // differents formats char , short, etc...
510 // differents components 1..3 ex. jpg ->RGB 3
511 imsize = imsize * first->GetScalarSize() * first->GetNumberOfScalarComponents();
512 // Order the file name vector already did with the OutputModel!!!
513 //!!!!out.img->SetSpacing(i_zspc);
515 std::vector<std::string>::iterator it;
516 for (it=im.begin(); it!=im.end(); ++it)
518 vtkImageData* cur = mReader.GetImage( (*it) );
519 memcpy(out.img->GetScalarPointer(0,0,slice), cur->GetScalarPointer(0,0,0), imsize);
522 getAttributes(im.front(),out.infos, i_attr);
523 o_output.push_back(out);
527 // TO DO NO VERY SURE : NEED TO BE TESTED
528 //////////////////////////////////////////////////////////
529 // create an output structure with n entries (T size) = T output (n size)
530 //////////////////////////////////////////////////////////
531 void GimmickView::readImages2(std::vector<OutStrGimmick>& o_output, std::vector<std::string> im,
532 OutputAttr i_attr, double i_zspc)
534 vtkImageData* first = mReader.GetImage( im.front());
537 first->GetDimensions(dim);
538 first->GetSpacing(spac);
539 // differents formats char , short, etc...
540 // differents components 1..3 ex. jpg ->RGB 3
541 unsigned long imsize = dim[0] * dim[1];
542 imsize = imsize * first->GetScalarSize() * first->GetNumberOfScalarComponents();
544 // Order the file name vector already did with the OutputModel!!!
545 std::vector<std::string>::iterator it;
546 std::vector<OutStrGimmick>::iterator it_out = o_output.begin();
548 for (it=im.begin(); it!=im.end(); ++it, it_out += dim[2])
550 vtkImageData* cur = mReader.GetImage( (*it) );
551 for (int slice= 0 ; slice <dim[2]; slice++)
554 out.img = vtkImageData::New();
555 out.img->SetScalarType(first->GetScalarType());
556 out.img->SetSpacing(spac);
557 out.img->SetNumberOfScalarComponents(first->GetNumberOfScalarComponents());
559 first->GetWholeExtent(ext); // send also 0,0 in Z
561 out.img->SetExtent(ext);
563 out.img->SetDimensions(dim[0], dim[1], 1 );
564 out.img->AllocateScalars();
566 memcpy(out.img->GetScalarPointer(0,0,0), cur->GetScalarPointer(0,0,slice), imsize);
567 o_output.push_back(out);
570 getAttributes((*it),(*it_out).infos,i_attr);
574 getAttributes(im.front(), o_output.front().infos,i_attr);
579 //////////////////////////////////////////////////////////
580 // create an output structure with n entries (T size) = T + n output
581 //////////////////////////////////////////////////////////
582 void GimmickView::readImages4(std::vector<OutStrGimmick>& o_output, std::vector<std::string> im,
585 std::vector<std::string>::iterator it;
586 std::vector<OutStrGimmick>::iterator it_out = o_output.begin();
587 vtkImageData* first = mReader.GetImage( im.front());
589 first->GetDimensions(dim);
591 for (int slice= 0 ; slice <dim[2]; slice++)
594 out.img = vtkImageData::New();
595 out.img->SetScalarType(first->GetScalarType());
596 out.img->SetNumberOfScalarComponents(first->GetNumberOfScalarComponents());
600 first->GetWholeExtent(ext); // send also 0,0 in Z
602 out.img->SetExtent(ext);
603 first->GetSpacing(spac);
604 out.img->SetSpacing(spac);
605 out.img->SetDimensions(dim[0], dim[1], im.size() );
606 out.img->AllocateScalars();
608 unsigned long imsize = dim[0] * dim[1];
609 imsize = imsize * first->GetScalarSize() * first->GetNumberOfScalarComponents();
612 for (it=im.begin(); it!=im.end(); ++it, index ++)
614 vtkImageData* cur = mReader.GetImage( (*it) );
615 memcpy(out.img->GetScalarPointer(0,0,index), cur->GetScalarPointer(0,0,slice), imsize);
616 o_output.push_back(out);
619 if(!i_attr.mult) // No sense to take informations in all images
621 getAttributes(im.front(), o_output.front().infos,i_attr);
627 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
628 // Global function to read Images and create wished output (informations, multiple, type and size of output...)
629 // In function of type (file, vector) and size, the correct readImages function is selected
630 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
631 void GimmickView::readImages(std::vector<OutStrGimmick>& o_output, std::vector<std::string> im,
632 OutputAttr i_attr, int i_dim, double i_zspc)
634 int size = im.size();
642 // Only one image : give it
643 // But take in count multiframe possibility
644 if ( isSingle(im.front()) || i_dim != 1)
646 readImages1(o_output,im, i_attr);
650 readImages2(o_output,im, i_attr,i_zspc);
656 // multiple or single frame
657 if ( isSingle(im.front()) )
659 //we deal with 2D images
663 readImages3(o_output,im, i_attr,i_zspc);
667 readImages1(o_output,im, i_attr);
672 // we deal with multiple frames n x (2D x T)
673 // Differents outputs are avaialable
676 // put all in one output
677 readImages3(o_output,im, i_attr,i_zspc);
682 // put in a vector of n x T (2D)
683 readImages2(o_output,im, i_attr,i_zspc);
687 // put in a vector of n (2D x T)
688 // No transformations.
689 readImages1(o_output,im, i_attr);
693 // put in a vector of T (2D x n)
694 readImages4(o_output,im, i_attr);
702 void GimmickView::ReadImagesNotThreadedInVector(std::vector<vtkImageData*>& s, std::vector<std::string> im, int dimension)
704 // Create the output data
707 // Only one image : give it
708 vtkImageData* out = vtkImageData::New();
709 GimmickDebugMessage(3, "State Check: Full Filename: "
712 out->ShallowCopy(mReader.GetImage(im.front()));
715 else if (im.size()>1) // Test inutile ? JPR
717 /// \TODO fix unused variable 'first'
718 vtkImageData* first = mReader.GetImage( im.front());
722 std::vector<std::string>::iterator it;
723 for (it=im.begin(); it!=im.end(); ++it)
725 vtkImageData* out = vtkImageData::New();
726 out->ShallowCopy(mReader.GetImage(*it));
733 // n *2D + T in a vector :
735 std::vector<std::string>::iterator it;
736 for (it=im.begin(); it!=im.end(); ++it)
738 vtkImageData* out = mReader.GetImage( (*it));
744 //======================================================================
746 //======================================================================
747 ///Requests the reading of an image
748 void GimmickView::RequestReading(tree::Node* n,
749 int prio, int selection_index, boost::shared_ptr<ImagePointerHolder> p)
756 ImageEventType t(n,selection_index);
758 mImageEventMap[n->GetAttribute("FullFileName")] = t;
759 mReader.Request(this,n->GetAttribute("FullFileName"),prio);
761 //======================================================================
763 //======================================================================
765 OnMultiThreadImageReaderEvent(const std::string& filename,
766 MultiThreadImageReaderUser::EventType e,
769 GimmickDebugMessage(7,
770 "MultiThreadImageReader event : "<<e<<std::endl);
773 if (filename.size()==0)
775 //What to do in this case?
777 GimmickDebugMessage(5,
778 "Pushing unknown image in queue"
780 mImageEventQueue.push_back(ImageEventType(image));*/
783 ImageEventTypeMap::iterator i;
784 //JCP 22-06-2009, test mImageEventMap.size() > 0
785 if(mImageEventMap.size()>0){
786 i = mImageEventMap.find(filename);
787 if (i!=mImageEventMap.end())
789 GimmickDebugMessage(5,
790 "Putting image of file '"<<filename<<"' on pointer"
792 ImageEventType ie(i->second);
794 ie.pointerHolder->Set(ie.image);
795 //mImageEventMap.erase(i);
801 std::string mess="ERROR: MultiThreadImageReader: Cannot read image in file ";
804 GimmickMessage(1,mess);
805 ImageEventTypeMap::iterator i;
806 i = mImageEventMap.find(filename);
807 if (i!=mImageEventMap.end())
809 ImageEventType ie(i->second);
811 ie.pointerHolder->Set(GetDefaultImage());
812 //mImageEventMap.erase(i);
816 else if (e==ImageUnloaded)
818 std::string mess="Unloaded image in file ";
821 GimmickMessage(1,mess);
822 ImageEventTypeMap::iterator i;
823 i = mImageEventMap.find(filename);
824 if (i!=mImageEventMap.end())
826 ImageEventType ie(i->second);
828 ie.pointerHolder->Set(GetDefaultImage());
829 //mImageEventMap.erase(i);
834 //====================================================================
836 //====================================================================
837 void GimmickView::ConnectValidationObserver(ValidationCallbackType callback)
839 mValidationSignal.connect(callback);
844 ////////////////////////////////////////////////////////////////////////
845 void GimmickView::Anonymize(std::vector<std::string> i_filenames, int type)
848 std::vector<GDCM_NAME_SPACE::FileHelper *> filesH;
849 std::vector<std::string> suid;
850 std::map<std::string, std::string> msuid;
851 std::string tempuid = GDCM_NAME_SPACE::Util::CreateUniqueUID();
853 std::vector<std::string>::iterator it = i_filenames.begin();
854 for(; it != i_filenames.end(); it++)
857 GDCM_NAME_SPACE::File *file;
858 file = GDCM_NAME_SPACE::File::New( );
859 file->SetLoadMode( GDCM_NAME_SPACE::LD_ALL );
860 file->SetFileName( (*it).c_str() );
864 std::cerr << "Sorry, " << (*it).c_str() <<" not a gdcm-readable "
865 << "DICOM / ACR File" <<std::endl;
869 std::cout << " ... is readable " << std::endl;
871 // We need a gdcm::FileHelper, since we want to load the pixels
872 GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(file);
874 uint8_t *imageData = fh->GetImageData();
877 file->AddAnonymizeElement(0x0008, 0x0080, "*");
879 file->AddAnonymizeElement(0x0010, 0x0010, "*");
881 file->AddAnonymizeElement( 0x0010, 0x0020,"1515" );
882 // Study Instance UID
883 file->AddAnonymizeElement(0x0020, 0x000d, tempuid );
885 file->AddAnonymizeElement(0x0010, 0x2154, "3615" );
887 // Aware user will add here more fields to anonymize here
889 // The gdcm::File is modified in memory
891 file->AnonymizeFile();
895 fh->SetContentType(GDCM_NAME_SPACE::UNMODIFIED_PIXELS_IMAGE);
897 fh->WriteDcmExplVR(file->GetFileName() +".ano1" );
898 std::cout << i <<" End Anonymize" << std::cout;
899 file->ClearAnonymizeList();
904 ////////////////////////////////////////////////////////////////////////
905 //void GimmickView::Anonymize(std::vector<std::string> i_filenames, int type)
908 // gdcm::FileMetaInformation::SetSourceApplicationEntityTitle( "gdcmanon" );
909 // gdcm::Global& g = gdcm::Global::GetInstance();
910 // //if( !resourcespath )
912 // // const char *xmlpathenv = getenv("GDCM_RESOURCES_PATH");
913 // // if( xmlpathenv )
915 // // // Make sure to look for XML dict in user explicitly specified dir first:
916 // // xmlpath = xmlpathenv;
917 // // resourcespath = 1;
920 // // if( resourcespath )
922 // // // xmlpath is set either by the cmd line option or the env var
923 // // if( !g.Prepend( xmlpath.c_str() ) )
925 // // std::cerr << "Specified Resources Path is not valid: " << xmlpath << std::endl;
929 // // All set, then load the XML files:
930 // if( !g.LoadResourcesFiles() )
934 // const gdcm::Defs &defs = g.GetDefs(); (void)defs;
937 // // only read the env var if no explicit cmd line option
938 // // maybe there is an env var defined... let's check
939 // const char *rootuid_env = getenv("GDCM_ROOT_UID");
943 // root = rootuid_env;
948 // // root is set either by the cmd line option or the env var
949 // if( !gdcm::UIDGenerator::IsValid( root.c_str() ) )
951 // std::cerr << "specified Root UID is not valid: " << root << std::endl;
954 // gdcm::UIDGenerator::SetRoot( root.c_str() );
959 // // Get private key/certificate
960 // gdcm::CryptographicMessageSyntax cms;
963 // if( !GetRSAKeys(cms, rsa_path.c_str(), cert_path.c_str() ) )
967 // cms.SetCipherType( ciphertype );
970 // // Setup gdcm::Anonymizer
971 // gdcm::Anonymizer anon;
973 // anon.SetCryptographicMessageSyntax( &cms );
977 // for(unsigned int i = 0; i < nfiles; ++i)
979 // const char *in = filenames[i].c_str();
980 // const char *out = outfilenames[i].c_str();
981 // if( !AnonymizeOneFileDumb(anon, in, out, empty_tags, remove_tags, replace_tags_value) )
983 // //std::cerr << "Could not anonymize: " << in << std::endl;
990 // // for(unsigned int i = 0; i < nfiles; ++i)
992 // // const char *in = filenames[i].c_str();
993 // // const char *out = outfilenames[i].c_str();
994 // // if( !AnonymizeOneFile(anon, in, out) )
996 // // //std::cerr << "Could not anonymize: " << in << std::endl;
1004 } // EO namespace creaImageIO