Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DICOMtools.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<EnableDefaultItems>true</EnableDefaultItems>
<Version>1.4.2</Version>
<Authors>Rob Holme</Authors>
Expand Down
108 changes: 108 additions & 0 deletions module/DicomTools.format.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,5 +224,113 @@
</View>


<View>
<Name>SendCGetResult</Name>
<ViewSelectedBy>
<TypeName>DicomTools.SendCGetResult</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>SOPInstanceUID</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>SOPClassUID</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>FilePath</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Status</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>SOPInstanceUID</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>SOPClassUID</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>FilePath</PropertyName>
</TableColumnItem>
<TableColumnItem>
<ScriptBlock>
if ($_.Status -ne "Success") {
"$([char]0x1b)[1;91m$($_.Status)$([char]0x1b)[0m"
}
else {
$_.Status
}
</ScriptBlock>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>

<View>
<Name>SendCMoveResult</Name>
<ViewSelectedBy>
<TypeName>DicomTools.SendCMoveResult</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>MoveDestination</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Status</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Completed</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Failed</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Warning</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Remaining</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>MoveDestination</PropertyName>
</TableColumnItem>
<TableColumnItem>
<ScriptBlock>
if ($_.Status -ne "Success") {
"$([char]0x1b)[1;91m$($_.Status)$([char]0x1b)[0m"
}
else {
$_.Status
}
</ScriptBlock>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Completed</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Failed</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Warning</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Remaining</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>

</ViewDefinitions>
</Configuration>
2 changes: 1 addition & 1 deletion module/DicomTools.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ FormatsToProcess = @('DicomTools.format.ps1xml')
FunctionsToExport = @()

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @('Send-CEcho','Get-DicomTag','Send-CFind', 'Send-DMWLQuery')
CmdletsToExport = @('Send-CEcho','Get-DicomTag','Send-CFind', 'Send-DMWLQuery', 'Send-CGet', 'Send-CMove')

# Variables to export from this module
VariablesToExport = @()
Expand Down
2 changes: 1 addition & 1 deletion publish.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
del .\DicomTools.sln
del .\module\lib\
dotnet publish --configuration release --framework net6.0 --output .\module\lib\
dotnet publish --configuration release --framework net9.0 --output .\module\lib\
55 changes: 55 additions & 0 deletions src/Send-CGet.Result.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/// <summary>
/// An object containing the results to be returned to the pipeline for Send-CGet cmdlet.
/// </summary>

namespace DicomTools {

public class SendCGetResult {
private string sopInstanceUID;
private string sopClassUID;
private string filePath;
private string status;

/// <summary>
/// The SOP Instance UID of the retrieved image
/// </summary>
public string SOPInstanceUID {
get { return this.sopInstanceUID; }
set { this.sopInstanceUID = value; }
}

/// <summary>
/// The SOP Class UID of the retrieved image
/// </summary>
public string SOPClassUID {
get { return this.sopClassUID; }
set { this.sopClassUID = value; }
}

/// <summary>
/// The file path where the image was saved
/// </summary>
public string FilePath {
get { return this.filePath; }
set { this.filePath = value; }
}

/// <summary>
/// The status of the retrieval
/// </summary>
public string Status {
get { return this.status; }
set { this.status = value; }
}

/// <summary>
/// Populate the class members with results from the C-GET
/// </summary>
public SendCGetResult(string SOPInstanceUID, string SOPClassUID, string FilePath, string Status) {
this.sopInstanceUID = SOPInstanceUID;
this.sopClassUID = SOPClassUID;
this.filePath = FilePath;
this.status = Status;
}
}
}
Loading
Loading