@c ---------------------------------------------------
@node  Dicom Functions
@section  Dicom Functions
@cindex  Dicom Functions
@c Dicom Functions dicomanon
@c -----------------------------------------
@subsection  dicomanon
@cindex  dicomanon
@deftypefn {Loadable Function} {} dicomanon(@var{file_in}, @var{file_out})
@deftypefnx {Loadable Function} {} dicomanon(___, @var{name}, @var{value})

Anonymize a DICOM format file by removing or replacing specific fields.

@var{file_in} is filename to read from.@*
@var{file_out} is the filename to write to.@*
@var{name}, @var{value} optional name/value properties.@*

Known property names are:
@table @asis
@item keep
The value is a cell array of names to not remove during the anonymize procedure.
@item update
A structure of name/values to update rather than remove.
@end table

@xseealso{dicomread, dicomwrite, dicominfo}
@end deftypefn 

@c Dicom Functions dicomdict
@c -----------------------------------------
@subsection  dicomdict
@cindex  dicomdict
@deftypefn {Loadable Function} {@var{dictionary_name} =} dicomdict (@code{get}) 
@deftypefnx {Loadable Function} {} dicomdict (@code{factory}) 
@deftypefnx {Loadable Function} {} dicomdict (@code{set}, @var{dictionary_name}) 

Get or set the active dicom data dictionary.

The first usage returns the filename of the dictionary that is currently being used.
Using @code{factory} resets the dictionary to the default.
Using @code{set} allows setting the dictionary for future operations.
In this case, the dictionary file @var{dictionary_name} can be anywhere in the path.

@xseealso{dicomread, dicomwrite}
@end deftypefn 

@c Dicom Functions dicomdisp
@c -----------------------------------------
@subsection  dicomdisp
@cindex  dicomdisp
@deftypefn {Loadable Function} {} dicomdisp (@var{filename}) 
@deftypefnx {Loadable Function} {} dicomdisp (@var{filename}, [@var{propertyname}, @var{propertvalue} ...]) 
Read and display the metadata from a DICOM file.

@var{filename} - dicomfilename to display.@*
@var{propertyname}, @var{propertvalue} - property pairs for options to the display function.

Currently the only known property is 'dictionary' to specify a non default dict to use.
@xseealso{dicomread, dicominfo} 
@end deftypefn

@c Dicom Functions dicominfo
@c -----------------------------------------
@subsection  dicominfo
@cindex  dicominfo
@deftypefn {Loadable Function} {@var{info}} = dicominfo (@var{filename}) 
@deftypefnx {Loadable Function} {@var{info}} = dicominfo (@var{filename}, @code{dictionary}, @var{dictionary-name}) 
@deftypefnx  {Loadable Function} {} dicominfo (@var{filename}, @var{options}) 
@deftypefnx {Command} {} dicominfo @var{filename} 
@deftypefnx {Command} {} dicominfo @var{filename} @var{options} 
Get all data from a DICOM file, excluding any actual image. 
@var{info} is a nested struct containing the data. 

If no return argument is given, then there will be output similar to 
a DICOM dump. 

If the @code{dictionary} argument is used, the given @var{dictionary-name} is used for this operation, 
otherwise, the dictionary set by @code{dicomdict} is used.

@var{options}:
@code{truncate=n}
where n is the number of characters to limit the dump output display to @code{n}
for each value. 

@xseealso{dicomread, dicomdict} 
@end deftypefn

@c Dicom Functions dicomlookup
@c -----------------------------------------
@subsection  dicomlookup
@cindex  dicomlookup
@deftypefn {Loadable Function} @var{keyword} = dicomlookup (@var{group}, @var{element}) 
@deftypefnx {Loadable Function} [@var{group}, @var{element}] = dicomlookup (@var{keyword}) 

Lookup an attribute in the DICOM data dictionary.

@var{keyword} = dicomlookup (@var{group}, @var{element}) will look in the current dicom 
dictionary for a specified @var{group} and @var{element} tag and returns string name 
of the attribute.

[@var{group}, @var{element}] = dicomlookup (@var{keyword}) will look in the current dicom 
dictionary for a specified @var{keyword} string and returns the @var{group} and @var{element}
for keyword.

@xseealso{dicomdict}
@end deftypefn 

@c Dicom Functions dicomread
@c -----------------------------------------
@subsection  dicomread
@cindex  dicomread
@deftypefn {Loadable Function} @var{image} = dicomread (@var{filename}) 
@deftypefnx {Loadable Function} @var{image} = dicomread (@var{structure}) 

Load the image from a DICOM file. 
@var{filename} is a string (giving the filename).
@var{structure} is a structure with a field @code{Filename} (such as returned by @code{dicominfo}).
@var{image} may be two or three dimensional, depending on the content of the file. 
An integer or float matrix will be returned, the number of bits will depend on the file. 

@xseealso{dicominfo} 
@end deftypefn 

@c Dicom Functions dicomuid
@c -----------------------------------------
@subsection  dicomuid
@cindex  dicomuid
@deftypefn {Loadable Function} @var{uuid} = dicomuuid () 

Generate a DICOM unique id . 

@var{uuid} is a unique id string.

@end deftypefn 

@c Dicom Functions dicomwrite
@c -----------------------------------------
@subsection  dicomwrite
@cindex  dicomwrite
@deftypefn {Loadable Function} {} dicomwrite(@var{im}, @var{filename})
@deftypefnx {Loadable Function} {} dicomwrite(@var{im}, @var{filename}, @var{info})

Write a DICOM format file to @var{filename}.

@var{im} is image data or empty matrix, [], if only metadata save is required
@var{filename} is filename to write dicom to. if [], then function runs in verbose trial mode.
@var{info} struct, like that produced by dicominfo

@xseealso{dicomread, dicominfo}
@end deftypefn 

@c Dicom Functions isdicom
@c -----------------------------------------
@subsection  isdicom
@cindex  isdicom
@deftypefn {Loadable Function} {} isdicom (@var{filename}) 
Return true if @var{filename} is a valid DICOM file.

@xseealso{dicomdict, dicominfo, dicomread, dicomwrite} 
@end deftypefn
