johnperry/CTP

Problems with function contents(...)

Closed this issue · 1 comments

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.

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