public class RotateFlipSetOfImages
extends java.lang.Object
A class containing an application for rotating and/or flipping a set of images and updating the other attributes accordingly.
Modifier and Type | Class and Description |
---|---|
protected class |
RotateFlipSetOfImages.OurMediaImporter |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
dstFolderName |
protected boolean |
horizontal_flip |
protected java.lang.String |
ourAETitle |
protected int |
rotation |
protected boolean |
update_orientation |
Constructor and Description |
---|
RotateFlipSetOfImages(int rotation,
boolean horizontal_flip,
boolean update_orientation,
java.lang.String src,
java.lang.String dstFolderName,
MessageLogger logger) |
Modifier and Type | Method and Description |
---|---|
static void |
correctImageOrientationPatient(AttributeList list,
int rotation,
boolean horizontal_flip) |
static void |
correctPatientOrientation(AttributeList list,
int rotation,
boolean horizontal_flip) |
static double[] |
invertDirectionOfColumnVector(double[] vImageOrientationPatient) |
static double[] |
invertDirectionOfRowVector(double[] vImageOrientationPatient) |
static void |
main(java.lang.String[] arg)
Rotating and/or flipping a set of images and updating the other attributes accordingly.
|
static void |
setDerived(AttributeList list,
int rotation,
boolean horizontal_flip,
boolean update_orientation) |
static double[] |
swapRowAndColumnVectors(double[] vImageOrientationPatient) |
protected java.lang.String ourAETitle
protected java.lang.String dstFolderName
protected int rotation
protected boolean horizontal_flip
protected boolean update_orientation
public RotateFlipSetOfImages(int rotation, boolean horizontal_flip, boolean update_orientation, java.lang.String src, java.lang.String dstFolderName, MessageLogger logger) throws java.io.IOException, DicomException
java.io.IOException
DicomException
public static void setDerived(AttributeList list, int rotation, boolean horizontal_flip, boolean update_orientation) throws DicomException
DicomException
public static void correctPatientOrientation(AttributeList list, int rotation, boolean horizontal_flip) throws DicomException
DicomException
public static double[] swapRowAndColumnVectors(double[] vImageOrientationPatient)
public static double[] invertDirectionOfRowVector(double[] vImageOrientationPatient)
public static double[] invertDirectionOfColumnVector(double[] vImageOrientationPatient)
public static void correctImageOrientationPatient(AttributeList list, int rotation, boolean horizontal_flip) throws DicomException
DicomException
public static void main(java.lang.String[] arg)
Rotating and/or flipping a set of images and updating the other attributes accordingly.
arg
- array of 5 strings - rotation (0, 90, 180 or 270 degrees), horizontal flip (Y or N), update orientation (Y or N), source folder or DICOMDIR, destination folder