Annotation Pro API
|
An annotation. More...
Inherits Component.
Public Member Functions | |
Annotation () | |
Default constructor. More... | |
Annotation (IContainer container) | |
Constructor. More... | |
void | AlignSelectedLayers (int maxDistance) |
Align segments on selected layers. First layer is pattern for others. More... | |
void | AudioEmbedToExternal (AudioFileObject audioFile) |
Remove audio file from ANT file and link to external audio file. More... | |
void | AudioExternalToEmbed (AudioFileObject audioFile) |
Import external audio file to ANT file. More... | |
string | AudioFileToPath (AudioFileObject audioFile) |
Retrieve audio file path from AudioFileObject. If extrnal returns FileName otherwise returns combination DataFolder and FileName. More... | |
void | AutoGroup (LayerCollection layerCollection) |
Automatic group. More... | |
void | ClearParameters (LayerCollection selectedLayers) |
Clears the parameters described by selectedLayers. More... | |
void | ClearParameters (LayerCollection selectedLayers, bool onlySelectedSegments) |
Clears the parameters described by selectedLayers. More... | |
void | ClearSelection () |
Clears the selection. More... | |
void | ClearSelection (bool clearLayers, bool clearSegments) |
Clears the selection. More... | |
void | ClearVideoIndex (int videoIndex, bool changeIsModified) |
Clears given video index in all layers. More... | |
void | Consolidate (LayerCollection layerCollection, string label) |
Consolidates. More... | |
void | Consolidate (LayerObject layer, string label) |
Consolidates. More... | |
void | CopyToClipboard () |
Copies to clipboard. More... | |
void | Crop (float start, float end) |
Crops annotation to given start and end. More... | |
void | CutToClipboard () |
Cuts to clipboard. More... | |
void | DeleteSegment (SegmentObject segment) |
Deletes the segment described by segment. More... | |
string | ExportLayerToCSVString (LayerObject layer) |
Exports layer to CSV string. More... | |
void | ExportLayerToTextGrid (LayerObject layer, string fileName, float lengthInSamples, int threshold) |
Exports layer to TextGrid file. More... | |
string | ExportLayerToTextGridString (LayerObject layer, int layerIndex, float lengthInSamples, int threshold) |
Exports layer to TextGrid string. More... | |
string | ExportSegmentToTextGridString (SegmentObject segment, int index) |
Exports segment to TextGrid string. More... | |
string | ExportTextGridHeader (float lengthInSamples, int layersCount) |
Creates TextGrid header string. More... | |
void | ExportToCSV (bool open) |
Export to CSV. More... | |
void | ExportToEAF (bool open) |
Export annotation to EAF file (ELAN). More... | |
void | ExportToTextGrid (bool open, float lengthInSamples, int threshold) |
Export all layers to TextGrid file. More... | |
void | ExportToTextGrid (string fileName, bool open, float lengthInSamples, int threshold) |
Exports annotation to TextGrid. More... | |
void | ExportToXRA (bool open) |
Export annotation to XRA file (Sppas). More... | |
void | FillPauses (LayerCollection layerCollection, string pauseLabel, float rangeStart, float rangeEnd, float minimumSpace, float maximumSpace) |
Fill pauses. More... | |
void | FillPauses (LayerObject layer, string pauseLabel, float rangeStart, float rangeEnd, float minimumSpace, float maximumSpace) |
Fill pauses. More... | |
void | Find (string findText) |
Searches for the first match for the given string. More... | |
void | Find (string findText, FindReplaceOptions options) |
Searches for the first match for the given string. More... | |
void | FindAll (string findText) |
Searches for the first all. More... | |
void | FindAll (string findText, FindReplaceOptions options) |
Searches for the first all. More... | |
string | FindAudioInFolder () |
Find wave file in folder annotation file folder. More... | |
SegmentObject | FindLeftMostSegment () |
Find most left segment in whole annotation. More... | |
SegmentObject | FindRightMostSegment () |
Find most right segment in whole annotation. More... | |
string | GetContentCSVString () |
Gets content CSV string. More... | |
string | GetContentHeaderCSVString () |
Gets content header CSV string. More... | |
KeyValuePair< string, string > | GetTextGridPairFromLine (string line) |
Gets text grid pair from line. More... | |
void | GroupSelectedSegments () |
Group selected segments. More... | |
LayerObject | ImportLayerFromBLF (string fileName) |
Import layer from blf. More... | |
LayerObject | ImportLayerFromCSVLabelStartStop (string fileName, int samplerate) |
Import layer from CSV label start stop. More... | |
LayerObject | ImportLayerFromText (int startInSamples, string text) |
Import layer from text. More... | |
LayerObject | ImportLayerFromText (int startInSamples, int lineDurationInSamples, string text) |
Imports layer from text, converts lines into segments. Each segment has given line duration. More... | |
LayerObject | ImportLayerFromTRS (string fileName, int samplerate) |
Import layer from trs. More... | |
LayerCollection | ImportLayersFromPraatF0 (string fileName, int samplerate) |
Import layers from Praat F0 file. More... | |
LayerCollection | ImportLayersFromPraatFormants (string fileName, int samplerate) |
Import layers from Praat formants file. More... | |
LayerCollection | ImportLayersFromTextGrid (string fileName, int samplerate) |
Import layers from text grid. More... | |
AudioFileObject | InsertAudioFile (string sourceFile, bool external) |
Inserts an audio file described by sourceFile. More... | |
void | InsertVideoFile (string sourceFile, double duration) |
Inserts video file into annotation. More... | |
void | InvertSegmentSelection () |
Inverts segment selection. More... | |
bool | New () |
Creates new annotation. More... | |
bool | Open () |
Opens annotation. More... | |
bool | Open (string fileName) |
Opens annotation. More... | |
void | PasteFromClipboard (LayerObject destinationLayer, float startPosition, float maxPosition) |
Pastes from clipboard. More... | |
void | RemoveAudioFile (AudioFileObject audioFile) |
Removes audio file from data. More... | |
void | RemoveVideoFile (VideoFileObject videoFile) |
Removes given video file from annotation. More... | |
void | Replace (string findText, string replaceText) |
Replaces. More... | |
void | Replace (string findText, string replaceText, FindReplaceOptions options) |
Replaces. More... | |
void | ReplaceAll (string findText, string replaceText) |
Replace all. More... | |
void | ReplaceAll (string findText, string replaceText, FindReplaceOptions options) |
Replace all. More... | |
bool | Save () |
Saves this object. More... | |
bool | Save (string filePath) |
Saves this object. More... | |
bool | SaveAs () |
Saves annotation as. More... | |
void | SaveSubAnnotation (string annotationFilePath, float start, float end, bool withAudioFiles) |
Saves a sub annotation. More... | |
void | SelectGroup (SegmentObject segment) |
Selects group. More... | |
void | SelectSegmentRange (SegmentObject segmentFrom, SegmentObject segmentTo) |
Select segment range. More... | |
void | SendSelectionChanged (object sender, EventArgs e) |
Sends a selection changed. More... | |
bool | SpaceSegmentsEqually (LayerObject layer, float samplesCount) |
Spaces segment equally on selected layer. More... | |
List< SegmentCollection > | Split (LayerObject layer, string label) |
Splits. More... | |
List< SegmentCollection > | SplitByCount (LayerObject layer, int count) |
Splits by count. More... | |
List< SegmentCollection > | SplitByPauses (LayerObject layer) |
Splits by pauses. More... | |
void | UngroupSelectedSegments () |
Ungroup selected segments. More... | |
Protected Member Functions | |
override void | Dispose (bool disposing) |
Clean up any resources being used. More... | |
Properties | |
string | AnnotationFileName [get] |
Annotation file name build in application, normally "annotation.xml" when use with DataFolder gets access to annotation XML. More... | |
AudioFileCollection | AudioFiles = new LayerCollection() [get, set] |
Gets or sets the audio files. More... | |
string | Author = string.Empty [get, set] |
Gets or sets author of the annotation. More... | |
ConfigurationCollection | Configuration = new SpeakerCollection() [get, set] |
Gets or sets the configuration. More... | |
string | DataFolder = new ConfigurationCollection() [get, set] |
Gets the pathname of the data folder. More... | |
string | FilePath = string.Empty [get, set] |
Gets the full pathname of the file. More... | |
bool | InSessionMode = string.Empty [get, set] |
Gets or sets a value indicating whether the in session mode. More... | |
bool | IsModified [get, set] |
Gets or sets a value indicating whether this object is modified. More... | |
bool | IsPlainXmlFormat = "New Annotation" [get, set] |
If true annotation is saved in plain ANTX (xml) file instead of boxing annotation.xml in ANT (zip) file. More... | |
LayerCollection | Layers [get, set] |
Gets or sets the layers. More... | |
float | Length [get] |
Get annotation length in seconds, last segment end position determines length of annotation. More... | |
bool | LockExistingLayersInSession = false [get, set] |
Gets or sets a value indicating whether the existing layers in session is locked. More... | |
string | ProjectCollection = string.Empty [get, set] |
Gets or sets a collection of projects. More... | |
string | ProjectCorpusOwner = string.Empty [get, set] |
Gets or sets the project corpus that owns this item. More... | |
string | ProjectCorpusType = string.Empty [get, set] |
Gets or sets the type of the project corpus. More... | |
string | ProjectDescription = string.Empty [get, set] |
Gets or sets information describing the project. More... | |
string | ProjectEnvironment = string.Empty [get, set] |
Gets or sets the project environment. More... | |
string | ProjectLicense = string.Empty [get, set] |
Gets or sets the project license. More... | |
string | ProjectNoises = string.Empty [get, set] |
Gets or sets the project noises. More... | |
string | ProjectTitle [get, set] |
Gets or sets the project title. More... | |
int | Samplerate [get, set] |
Gets or sets the samplerate. More... | |
LayerObject | SelectedLayer = false [get] |
Gets the selected layer. More... | |
LayerCollection | SelectedLayers [get] |
Gets the selected layers. More... | |
SegmentObject | SelectedSegment [get] |
Gets the selected segment. More... | |
SegmentCollection | SelectedSegments [get] |
Gets the selected segments. More... | |
SettingsCollection | Settings = new VideoFileCollection() [get, set] |
Gets or sets options for controlling the operation. More... | |
SpeakerCollection | Speakers = new SettingsCollection() [get, set] |
Gets or sets speaker for annotation. More... | |
string | SuggestedFileName = "annotation.xml" [get, set] |
Suggested name in SaveFileDialog More... | |
VideoFileCollection | VideoFiles = new AudioFileCollection() [get, set] |
Gets or sets video files. More... | |
Events | |
ChangedHandler | Changed |
Event queue for all listeners interested in Changed events. More... | |
ChangedHandler | Modified |
Event queue for all listeners interested in Modified events. More... | |
SelectionChangedHandler | SelectionChanged |
Event queue for all listeners interested in SelectionChanged events. More... | |
An annotation.
|
inline |
Default constructor.
|
inline |
Constructor.
container | The container. |
|
inline |
Align segments on selected layers. First layer is pattern for others.
maxDistance | select only borders less than maxDistance |
|
inline |
Remove audio file from ANT file and link to external audio file.
audioFile | Audio file information |
|
inline |
Import external audio file to ANT file.
audioFile | Audio file with information |
|
inline |
Retrieve audio file path from AudioFileObject. If extrnal returns FileName otherwise returns combination DataFolder and FileName.
audioFile | audio file object |
|
inline |
Automatic group.
layerCollection | Collection of layers. |
|
inline |
Clears the parameters described by selectedLayers.
selectedLayers | The selected layers. |
|
inline |
Clears the parameters described by selectedLayers.
selectedLayers | The selected layers. |
onlySelectedSegments | true to only selected segments. |
|
inline |
Clears the selection.
|
inline |
Clears the selection.
clearLayers | true to clear layers. |
clearSegments | true to clear segments. |
|
inline |
Clears given video index in all layers.
videoIndex | Video index to clear |
changeIsModified | If true changes IsModified flag |
|
inline |
Consolidates.
layerCollection | Collection of layers. |
label | The label. |
|
inline |
Consolidates.
layer | The layer. |
label | The label. |
|
inline |
Copies to clipboard.
|
inline |
Crops annotation to given start and end.
start | cropping start position in samples |
end | cropping end position in samples |
|
inline |
Cuts to clipboard.
|
inline |
Deletes the segment described by segment.
segment | The segment. |
|
inlineprotected |
Clean up any resources being used.
disposing | true if managed resources should be disposed; otherwise, false. |
|
inline |
Exports layer to CSV string.
layer | Layer to export |
|
inline |
Exports layer to TextGrid file.
layer | Source layer to export |
fileName | Destination TextGrid file name |
lengthInSamples | Full length in samples |
threshold | Threshold to decide whether move to border or fill in the gap |
|
inline |
Exports layer to TextGrid string.
layer | Layer to export |
layerIndex | Layer index (starts from 1) |
lengthInSamples | Full length in samples |
threshold | Threshold to decide whether move to border or fill in the gap |
|
inline |
Exports segment to TextGrid string.
segment | Source segment |
index | Index of the segment |
|
inline |
Creates TextGrid header string.
lengthInSamples | Full length in samples |
layersCount | Layers count |
|
inline |
Export to CSV.
open | true to open. |
|
inline |
Export annotation to EAF file (ELAN).
open | Open file after export if true |
|
inline |
Export all layers to TextGrid file.
open | Open after export |
lengthInSamples | Full length in samples |
threshold | Threshold param |
|
inline |
Exports annotation to TextGrid.
fileName | Destination file name |
open | Open in default application after export |
lengthInSamples | Full length in samples |
threshold | Threshold to decide whether move to border or fill in the gap |
|
inline |
Export annotation to XRA file (Sppas).
open | Open file after export if true |
|
inline |
Fill pauses.
layerCollection | Collection of layers. |
pauseLabel | The pause label. |
rangeStart | Start position |
rangeEnd | End position |
minimumSpace | Minimum size of space to fill pause |
maximumSpace | Maximum size of space to fill pause |
|
inline |
Fill pauses.
layer | The layer. |
pauseLabel | The pause label. |
rangeStart | Start position |
rangeEnd | End position |
minimumSpace | Minimum size of space to fill pause |
maximumSpace | Maximum size of space to fill pause |
|
inline |
Searches for the first match for the given string.
findText | The find text. |
|
inline |
Searches for the first match for the given string.
findText | The find text. |
options | Options for controlling the operation. |
|
inline |
Searches for the first all.
findText | The find text. |
|
inline |
Searches for the first all.
findText | The find text. |
options | Options for controlling the operation. |
|
inline |
Find wave file in folder annotation file folder.
|
inline |
Find most left segment in whole annotation.
|
inline |
Find most right segment in whole annotation.
|
inline |
Gets content CSV string.
|
inline |
Gets content header CSV string.
|
inline |
Gets text grid pair from line.
line | The line. |
|
inline |
Group selected segments.
|
inline |
|
inline |
Import layer from CSV label start stop.
fileName | Filename of the file. |
samplerate | The samplerate. |
|
inline |
Import layer from text.
startInSamples | The start in samples. |
text | The text. |
|
inline |
Imports layer from text, converts lines into segments. Each segment has given line duration.
startInSamples | Where to put first segment |
lineDurationInSamples | Each segment duration |
text | Text to convert into segments. |
|
inline |
Import layer from trs.
fileName | Filename of the file. |
samplerate | The samplerate. |
|
inline |
Import layers from Praat F0 file.
fileName | Filename of the file. |
samplerate | The samplerate. |
|
inline |
Import layers from Praat formants file.
fileName | Filename of the file. |
samplerate | The samplerate. |
|
inline |
Import layers from text grid.
fileName | Filename of the file. |
samplerate | The samplerate. |
|
inline |
Inserts an audio file described by sourceFile.
sourceFile | Audio source file path. |
external | If false saves audio in ANT file. |
|
inline |
Inserts video file into annotation.
sourceFile | File path with video source |
duration | Duration of video file in samples |
|
inline |
Inverts segment selection.
|
inline |
Creates new annotation.
|
inline |
Opens annotation.
|
inline |
Opens annotation.
fileName | Filename of the file. |
|
inline |
Pastes from clipboard.
destinationLayer | Destination layer. |
startPosition | The start position. |
maxPosition | The maximum position. |
|
inline |
Removes audio file from data.
audioFile | Audio file to remove |
|
inline |
Removes given video file from annotation.
videoFile | Video file to delete |
|
inline |
Replaces.
findText | The find text. |
replaceText | The replace text. |
|
inline |
Replaces.
findText | The find text. |
replaceText | The replace text. |
options | Options for controlling the operation. |
|
inline |
Replace all.
findText | The find text. |
replaceText | The replace text. |
|
inline |
Replace all.
findText | The find text. |
replaceText | The replace text. |
options | Options for controlling the operation. |
|
inline |
Saves this object.
|
inline |
Saves this object.
filePath | The full pathname of the file. |
|
inline |
Saves annotation as.
|
inline |
Saves a sub annotation.
annotationFilePath | Full pathname of the annotation file. |
start | Start subannotation |
end | End subannotation |
withAudioFiles | If true save subannotation with Audio File section |
|
inline |
Selects group.
segment | The segment. |
|
inline |
Select segment range.
segmentFrom | The segment from. |
segmentTo | The segment to. |
|
inline |
Sends a selection changed.
sender | Source of the event. |
e | Event information. |
|
inline |
Spaces segment equally on selected layer.
layer | Layer to space segments. |
samplesCount | samples count |
|
inline |
Splits.
layer | The layer. |
label | The label. |
|
inline |
Splits by count.
layer | The layer. |
count | Number of. |
|
inline |
Splits by pauses.
layer | The layer. |
|
inline |
Ungroup selected segments.
|
get |
Annotation file name build in application, normally "annotation.xml" when use with DataFolder gets access to annotation XML.
|
getset |
Gets or sets the audio files.
The audio files.
|
getset |
Gets or sets author of the annotation.
|
getset |
Gets or sets the configuration.
The configuration.
|
getset |
Gets the pathname of the data folder.
The pathname of the data folder.
|
getset |
Gets the full pathname of the file.
The full pathname of the file.
|
getset |
Gets or sets a value indicating whether the in session mode.
true if in session mode, false if not.
|
getset |
Gets or sets a value indicating whether this object is modified.
true if this object is modified, false if not.
|
getset |
If true annotation is saved in plain ANTX (xml) file instead of boxing annotation.xml in ANT (zip) file.
|
getset |
Gets or sets the layers.
The layers.
|
get |
Get annotation length in seconds, last segment end position determines length of annotation.
|
getset |
Gets or sets a value indicating whether the existing layers in session is locked.
true if lock existing layers in session, false if not.
|
getset |
Gets or sets a collection of projects.
A Collection of projects.
|
getset |
Gets or sets the project corpus that owns this item.
The project corpus owner.
|
getset |
Gets or sets the type of the project corpus.
The type of the project corpus.
|
getset |
Gets or sets information describing the project.
Information describing the project.
|
getset |
Gets or sets the project environment.
The project environment.
|
getset |
Gets or sets the project license.
The project license.
|
getset |
Gets or sets the project noises.
The project noises.
|
getset |
Gets or sets the project title.
The project title.
|
getset |
Gets or sets the samplerate.
The samplerate.
|
get |
Gets the selected layer.
The selected layer.
|
get |
Gets the selected layers.
The selected layers.
|
get |
Gets the selected segment.
The selected segment.
|
get |
Gets the selected segments.
The selected segments.
|
getset |
Gets or sets options for controlling the operation.
The settings.
|
getset |
Gets or sets speaker for annotation.
The speakers.
|
getset |
Suggested name in SaveFileDialog
|
getset |
Gets or sets video files.
Video files.
ChangedHandler Changed |
Event queue for all listeners interested in Changed events.
ChangedHandler Modified |
Event queue for all listeners interested in Modified events.
SelectionChangedHandler SelectionChanged |
Event queue for all listeners interested in SelectionChanged events.