johnperry / CTP

Clinical Trial Processor
http://mircwiki.rsna.org/index.php?title=CTP_Articles
65 stars 55 forks source link

Problems with function contents(...) #8

Closed Angel-Fernandez closed 9 years ago

Angel-Fernandez commented 9 years ago

Hi @johnperry,

My name is Angel. I'm using CTP DICOM Anonymizer and I'm having problems with this function @contents(ElementName,"regex").My objective is delete all non letters and numbers but this function always deletes the entire string. This is my function call:

@always()@contents(Series Description,"\W+")

Thanks and best regards.

johnperry commented 9 years ago

I just ran a test, and it worked for me.

Is your script formatted exactly as in your comment above? If so, the problem is that you have a space in "Series Description". The DICOM keyword is "SeriesDescription". (With a very few exceptions, the DICOM library in CTP uses the keywords defined in DICOM PS3.6.)

As an aside, if your script is for the SeriesDescription element, you can use the simpler syntax:

@contents(this,"\W+")

JP