-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mrpeek: added no text mode, modified boolean cmd line options #40
Conversation
cmd/mrpeek.cpp
Outdated
|
||
if (orthoview) { | ||
if (interactive and orthoview and show_text) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been writing a lot of python lately...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%:include <iostream>
struct X
<%
compl X() <%%> // destructor
X() <%%>
X(const X bitand) = delete; // copy constructor
bool operator not_eq(const X bitand other)
<%
return this not_eq bitand other;
%>
%>;
int main(int argc, char* argv<::>)
<%
// lambda with reference-capture:
auto say = <:bitand:>(const char* name)
<%
std::cout << "I like " << name << '\n';
%>;
if (argc > 1 and argv<:1:> not_eq nullptr) <%
say(argv<:1:>);
%>
else <%
say("Python");
%>
%>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, I had no idea there was such a thing as the alternative operators... Guess you learn something new every day!
Looks good, other than some slightly iffy syntax in places... ;) Couple of thoughts, not necessarily related to this PR as such:
|
- removed axis and orthoview options. - interactive y/n --> batch - added sagittal, coronal, axial options which deactivate orthoview - image y/n and text y/n --> noimage notext
Simplified the options as suggested and changed
|
and -nocrosshairs option to hide crosshairs
I made the focus explicitly integer-valued otherwise floating-point values would just be truncated. Looks all good to me. |
Nope, has to be floating point if you want to be able to skip indices, as per the example in the command line usage. An empty entry returns a NaN for a sequence of floats, but that's not supported for a sequence of ints. |
Ok, but I'd round instead of truncate: c3fddd2 |
👍 |
Added an option to remove text output in interactive or non-interactive mode. In non-interactive mode, this allows writing a sixel image to file via
which can then be displayed via
cat
on supported terminals or converted to png using sixel2png.